Announcement

Collapse
No announcement yet.

4Duino and ESP8266

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • AndrewJ
    replied
    You need the programming cable to start with, connected to the right pins - see the datasheet.

    Then, what I do is: press and hold UNTIL PROGRAMMING IS FINISHED the Atmel Reset button, press and hold the Wifi Flash button, press and hold Wifi Reset button, wait for 1 second, release Wifi Reset button, release Wifi Flash button, then initiate the upload from the Arduino IDE (I don't think you can do this with Workshop 4). When the upload is successful, release the Atmel Reset button.

    It's been a while as I've been working on a different part of my project for a while, but I think if your sketch on the Atmel processor doesn't use D8 and/or D9 pins then you don't need to hold the Atmel Reset button. If the Atmel is using those pins, then it interferes with the ESP8266 upload if the sketch is running because it will start up way quicker than your upload. Keeping the Atmel reset button pressed stops the Atmel booting up and running the sketch.

    The basic approach is described in the datasheet.

    Leave a comment:


  • rolant
    replied
    Hi Andrew,

    I followed attentively, mind your procedures, but I do not understand your last post, I am starting with 4Duino and I would be interested please share with me what did you finish? Did you manage to upload the program to ESP8266? How did you do it ?, thanks for sharing your experience.

    Rolant.

    Leave a comment:


  • AndrewJ
    replied
    Thanks Paul - that, or changing the atmel loaded sketch to disconnect D8 and D9 did it. Thanks for your help.

    Leave a comment:


  • pauleilio
    replied
    Hi Andrew,

    The method I use for getting flash mode is press & hold reset, press & hold flash, release reset, release flash.

    Best regards

    Paul

    Leave a comment:


  • AndrewJ
    replied
    Now that the ESP8266 is working, I can't work out how to upload a compiled sketch to it. I have the ESP8266 package installed in the Arduino IDE and have selected Generic ESP8266 module. Sketch compiles ok. I have the settings show in the image - based on the espresso loader that is used to reflash AT firmware, and the 4Duino is connected to the PC via USB and the programmer onto the 5-pin ESP header (oriented correctly.) I've tried with different reset methods. I try the 'put into boot loader mode' described in the datasheet: Press and hold Wifi Flash, press Wifi reset for about 1 second then let go, wait about a second then let go of Wifi Flash. Whatever I try, I get a timeout waiting for packet header. Arduino IDE is using esptool.py v2.8 - even though the image shows AVRISP mkII (esptool is not on option on that menu.)

    I'm sure there's a simple way of doing this. Could someone point me in the right direction.

    Thanks,

    Andrew

    Click image for larger version

Name:	Screenshot 2020-04-01 at 19.09.04.png
Views:	137
Size:	20.9 KB
ID:	71709
    Last edited by AndrewJ; 2 April 2020, 05:15 AM.

    Leave a comment:


  • AndrewJ
    replied
    Thanks Paul - given the issue I'm also having with pin D10, I'm wondering now if there's something more going on with the board. Other things seem fine though - the display/Picaso, the SD card, the main processor.

    Leave a comment:


  • pauleilio
    replied
    Thank you.

    I tried the NTP_Clock here and it worked fine and because of the timeout, it looks like the ESP8266 isn't communicating as it should. I will write a test program to diagnose what the ESP8266 does at power up.

    Best regards

    Paul

    Leave a comment:


  • AndrewJ
    replied
    Yes, nothing connected at all.

    Leave a comment:


  • pauleilio
    replied
    Hi Andrew,

    Thanks for trying and I am sorry you are still having a problem. Can you confirm that there is nothing attached to the didgital pins of the 4Duino while testing especially D8 & D9

    Best regards

    Paul

    Leave a comment:


  • AndrewJ
    replied
    Thanks Paul,

    that's a cleaner example. I don't know how I missed that sample code - I did check around and looked at other forum entries.

    I tried running it and I'm not getting anywhere - it seems the ESP module isn't responding to anything. I also added a couple of commands into the sample code and turned on the debug. Here is the output from the terminal:

    Start...

    ESP8266 version info:
    CMD to run>
    AT+GMR
    >TIMEOUT

    Set operating mode:
    CMD to run>
    AT+CWMODE_CUR=1
    >TIMEOUT

    Enumerate available APs:
    CMD to run>
    AT+CWLAP
    >TIMEOUT

    CMD to run>
    AT+CWJAP_CUR="Home Wireless","MYPASSWORDNOSPACESSPECIALCHARS"
    >TIMEOUT

    CMD to run>
    AT+CWJAP_CUR="Home Wireless","MYPASSWORDNOSPACESSPECIALCHARS"
    >TIMEOUT

    CMD to run>
    AT+CWJAP_CUR="Home Wireless","MYPASSWORDNOSPACESSPECIALCHARS"
    >TIMEOUT

    CMD to run>
    AT+CWJAP_CUR="Home Wireless","MYPASSWORDNOSPACESSPECIALCHARS"
    >TIMEOUT

    CMD to run>
    AT+CWJAP_CUR="Home Wireless","MYPASSWORDNOSPACESSPECIALCHARS"
    >TIMEOUT

    At this point, the code has the 4Duino halt in a permanent loop. I initially thought that maybe it didn't like the space in the SSID (I can't change that!) but it would seem all the commands are timing out, even the simple one to get version info so whilst the SSID maybe a problem at some point, it's not relevant right now. The wireless access point (my router) is approximately 3metres away from the 4duino with a clear line of sight and the antenna pointed straight at it.

    I considered doing a AT+RESTORE but I don't know if that would wipe the AT command set from it. Is there another way of testing this module is actually powering on?

    Leave a comment:


  • pauleilio
    replied
    Hi Andrew,

    Could you please try the NTP clock example. You can find it by clicking File, then Samples and then double click 4Duino, then Basic Graphics and finally NTP_Clock

    Add your SSID and Password in the code at the top and could you please let me know how it runs.

    Best regards

    Paul

    Leave a comment:


  • AndrewJ
    started a topic 4Duino and ESP8266

    4Duino and ESP8266

    I want to be able to remotely send commands to my application running on the 4Duino and I thought that I could do that over wi-fi with the ESP8266 that is on the board. This isn't something I've done before but I have looked around at tried various samples on this forum, none of which worked - they just reported station + softap error, Join AP failure, multiple error, start TCP server err and so on.

    From the datasheet:

    On the 4Duino the ATmega32U4 is offloading the Wi- Fi networking functions to the ESP8266, however it is capable of hosting an application by itself as it has a powerful processor and storage capability.
    From this, I'd imagined that I'd be able to upload an application to the ESP8266 module - say to serve a webpage at a specific URL that I could type a command in that would be passed, over a serial communication, from the ESP8266 to the ATMega, running my application, that could process it and respond. Running the comms part of an app on the ESP8266 would make use of its processor and memory, rather than that of the ATMega.

    The iTead library seems very old - last updated 4 years ago - so I don't even know if it's still valid or not. I thought I'd at least start off with something that acted as a server in the first instance and see if I could connect to it but as I say, nothing I found worked.

    Are there any app notes or working examples that could get me started?
Working...
X