I just got a AST-CAN485 Wifi Shield and following the following guide:
https://learn.sparkfun.com/tutorials/as … okup-guide
I choose the “Sparkfun ESP8266 Thing” board and when I upload any program from the examples, it will work once in a while right after the upload, but after a reset it never works.
It’s very inconsistent and I’m not sure what I’m doing wrong.
I’ve tried to upload the following sketch:
https://github.com/Atlantis-Specialist- … al-ESP.ino
This is the upload output:
Executable segment sizes:
ICACHE : 32768 - flash instruction cache
IROM : 236004 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 27277 / 32768 - code in IRAM (IRAM_ATTR, ISRs…)
DATA : 1496 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 880 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 25680 ) - zeroed variables (global, static) in RAM/HEAP
Sketch uses 265657 bytes (56%) of program storage space. Maximum is 466928 bytes.
Global variables use 28056 bytes (34%) of dynamic memory, leaving 53864 bytes for local variables. Maximum is 81920 bytes.
esptool.py v3.0
Serial port COM5
Connecting…
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 80:7d:3a:3c:dc:64
Uploading stub…
Running stub…
Stub running…
Configuring flash size…
Warning: Could not auto-detect Flash size (FlashID=0x1841f, SizeID=0x1), defaulting to 4MB
Flash params set to 0x0040
Compressed 269808 bytes to 198085…
Writing at 0x00000000… (7 %)
Writing at 0x00004000… (15 %)
Writing at 0x00008000… (23 %)
Writing at 0x0000c000… (30 %)
Writing at 0x00010000… (38 %)
Writing at 0x00014000… (46 %)
Writing at 0x00018000… (53 %)
Writing at 0x0001c000… (61 %)
Writing at 0x00020000… (69 %)
Writing at 0x00024000… (76 %)
Writing at 0x00028000… (84 %)
Writing at 0x0002c000… (92 %)
Writing at 0x00030000… (100 %)
Wrote 269808 bytes (198085 compressed) at 0x00000000 in 17.8 seconds (effective 121.1 kbit/s)…
Hash of data verified.
Leaving…
Soft resetting…
After the upload is done and verified I get garbage in the Serial Monitor and the program doesn’t run most of the time.
Sometimes it will work, but only right after the upload. If I disconnect the FTDI and reconnect it again and try and send any character, I get the following exception:
Exception in thread “AWT-EventQueue-0” java.lang.NullPointerException
at processing.app.Serial.write(Serial.java:254)
at processing.app.Serial.write(Serial.java:274)
at processing.app.SerialMonitor.send(SerialMonitor.java:122)
at processing.app.SerialMonitor.lambda$new$1(SerialMonitor.java:66)
at javax.swing.JTextField.fireActionPerformed(JTextField.java:508)
at javax.swing.JTextField.postActionEvent(JTextField.java:721)
at javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:836)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1668)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2929)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
at java.awt.Component.processEvent(Component.java:6316)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:835)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1103)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:974)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:800)
at java.awt.Component.dispatchEventImpl(Component.java:4760)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)