T3.x Flexiboard(?)

Status
Not open for further replies.
Tim, thank you very much.
Bad news for your GPIO15-loss: I just commented out GPIO15 from the"FlexiBoard_FlashESP.ino" - and it does not work. So, unfortunately, GPIO15 is needed to flash the ESP.
Can you somehow connect it to GND ? This would be sufficiant..

Needed parts: See post #22 :)

Have nice hollidays !!!
 
I hope it gets you going Frank.

I have a couple hours this morning - maybe I can solder another one up and try setup myself on a new machine from scratch.
Little chance of even GND to GPIO15 working on my First unit I had fully done with wires - trying to solder to what was left of the trace I used too heavy a wire and pulled off the rest of that.

I have de-surface mounted another from a board I put it on so I'll get that on my first FlexiBoard shortly. Will be sure to have these parts onboard.
WLAN :: ESP8266-ESP12E
=====
C10 100 uf CPOL-EUE1.8-4 E1,8-4
R8 10K R-EU_R0603 R0603
 
My SMD de-soldered ESP-12E is now soldered to the FlexiBoard v0.1. - and prior loaded ESP_Sketch is sending debug text out to the Talk Sketch to the Teensy and TYQT!

You program sketch has me baffled? Last edited to start in RUN mode - not sure how to tell it to go to program mode? I'll port mine over - it is ALL IN ONE - with USB commands to specify when to stop 'TALK MODE' and then set up 'Program Mode'. And I have some other commands I found useful as well. One thing I did was have the Teensy buffer the first lines of text out from the ESP - so I could see later if the serial buffer got dumped - the first thing the ESP might print out would include the IP address and a 'version string' which makes it handy to identify the unit and see how it booted and such things. In addition to RESET ESP, or take ESP to Program mode.

More on that later when I get my interface sketch cleaned up to work . . .
 
Hi Tim, the FlexiBoard_FlashESP8266.ino ?
It automatically enters the flashing-mode (and stays there!) when you're flashing the ESP with "nodemcu" reset-type. And of course, it resets the ESP auomatically, too. No need to do more than a press on the upload-button in Arduino..
It does not show you the Serial.print - output of the ESP. It is intended for flashing only!

It is a "howto" - example for the FlexiBoard - not a guide how to use the ESP :)
But..can you post your Sketch ? Perhaps i can edit it (our you??) and adapt it to the board..
 
Last edited:
Sample ESP on Arduino for FlexiBoard V0.1.

It is working for me!

Some new steps and findings. Not sure what they are all . . . some may appear below . . . but here is what I have working.

View attachment FB_ESP_ARDUINO.zip

One sketch for TEENSY :: FB_ESP_FullProxy

One sketch for ESP :: FB_myWebServer

My Arduino 1.6.12 Tools menu looks like this with a stock 4MB ESP-12E:
ESP_Arduino_Tools.PNG

If all the tools are installed per prior post you should be able to compile the FB_myWebServer.

Install and use TYQT - it shows you the COM# port easily and has a button to disable 'Serial' for Proxy Upload through Teensy.
{ Icon under Menu Bar labeled "Serial" is highlighted blue when Serial is monitored - CLICK that to disable Serial, Click again when not blue to enable - note hovering mouse highlights so move the mouse away to see this. }

Upload FB_ESP_FullProxy to your Teensy.

To SERIAL WIRE through Teensy :: PROGRAM on USB enter "P" ( Upper Case P ) - it will remind of this:
<<<PGoing to PGM MODE.
no more commands accepted:: RESTART TEENSY AFTER PROGRAM UPLOADED !!!!!
!!!!! >>>> DISABLE SERIAL MONITOR <<<<<<<<< !!!!!
>>>

You will need to enable 'Serial' in TYQT to see the output.
Restart the Teensy - TYQT has a "Reset" icon for this!
When Teensy comes up I do an "I" ( Upper Case I) - this will reset the ESP unit and have it Spew out the startup INFO like WiFi.localIP().

NOTE: The first time this may indicate something like this:
wifi config not set/found
General config applied
Wait for WiFi connection.
cannot connect to: MYSSID
Can not connect to WiFi station. Go into AP mode.
Soft AP started IP address: 192.168.4.1

I used my phone and connected to the AP 192.168.4.1 in this case and entered a device name and my WiFi SSID and Password - this is then stored on the ESP module in SPIFFS! I also told it to do NTP TIME and gave it my locale - the ESP starts up with LOCAL TIME KNOWN! On saving this it tells you to restart ESP. If entered properly it will connect to your SSID and then tell you the local IP. You can do that from TEENSY with "I" command to restart the ESP and have it show the startup text.

The ESP startup text is stored and can be displayed at any time with 'i' ( lower case I ) - If the Teensy was online before the ESP it will have this captured, the "I" command forces the ESP restart and resets the first info received to have this work!

The USB "?" command shows you a command line summary. Somethings may work - Possibly not ESTOP - the few pins connected to Teensy all seem to have special meaning - most freeze or reset the ESP.

AFTER THE FIRST WIRED UPLOAD ( takes FOREVER! ) - if you got through the above and all is well - you can now QUIT and restart your IDE. On power up the "Tools / Port" should now show a network location. For your next ESP ARDUINO upload you can selected this port and it will OTA UPLOAD your code FOUR to SIX times faster over WiFi and there is no Need to set pins or disable serial or WAIT! As long as you have not put any faulting code in your ESP sketch! This is the value of ESTOP - if it works { may need an external wire run to another pin from a free GPIO if it there is a conflict on GPIO_15 }

Thanks to KurtE - I found that exectuting the IDE a second time gives a unique instance - you can open the TEENSY sketch in the first IDE then execute the IDE EXE again ( not open a second sketch ) and the two will maintain unique TEMP directories and TOOLS settings and can be used alternatively!

ALWAYS WATCH the TOOLS settings for the ESP - if the MEMORY SPLIT on SPIFFS/CODE is ever changed you have to repeat too much of the above!

ALSO : YMMV: - for some reason my computer is trying to execute the .gz files on the ESP server - rather than having the ESP server run them and open the other pages! I have not found or tried the fix for this - it used to work. The alternative is to use the SPIFFS WRITE tool from your PC to flash over a directory contents to populate the ESP, or Manually upload the files USING BUILT IN FTP - but in either case the uncompressed source files are needed. I'm not sure what is going on here - there was a UTILITY HTML and other tools to adjust the CONFIG - now they are all .gz files I cannot use. I pulled them off and extracted them once and wrote them back - but I deleted what looked like duplicate .gz files and now the device won't start the webpage for me - so they must not have been duplicates. This was NOT like this before? There was a utility and an INDEX.html file that ran really cool stuff. I'll have to get back to this.

This is just posted here for now. Frank post questions/comments - or if it works put it on GitHub.
 
Hi Tim, i'll try that this evening :)

Seems to be a lot of fiddling to get it work ?
I guess i know why i did not use it in the past (and it is easy to use it with the "AT-Firmware" - nothing to do at all..) But i'll give it a try.
 
The gain is a full second CPU to handle the WiFi all offloaded from the Teensy. Plus the 3 MB SPIFFS would be a perfect place to OTA store the HEX to program a Teensy. Once that is down the ESP could feed the data over Serial and PJRC could perhaps offer a supported OTA update process! This was my goal when I started - then the PROP Shield went Beta and the new Teensy's - and now 6 months later . . .

It really isn't that hard - just finding the pieces which I should have covered? I'll confirm this form your efforts or when I go to set up my fresh machine.

I think pre-loading the SPIFFS image I did before is what made it work smoothly and I lost that.

I found this that might provide a decent over view of parts with pictures: adafruit-io-basics-esp8266-arduino?view=all#using-arduino-ide

I need to build out my FlexiBoard a bit more - some resistors and LED's - and see my ILI9341 touch to work. And I need to try adding the new Password before the OTA starts to protect the system.
 
DOH! The html comes with the library!

You can drop these over FTP once it is powered and on your local SSID.

I:\tCode\libraries\myWebServer\html

I had to do it using SPIFFS because I started doing that BEFORE I found the cool 'myWebServer' library with built in browser supported FTP drag and drop!
 
Phew... after lot of fiddling and installing all stuff, i got your webserver running :)
Besides, after entering my WLAN-SSID and Password, it went away and does not start anymore. I guess i have to reflash it (?!)
I'll give it another try tomorrow..

When compiling the stuff for the ESP, i see really TONS of Warnings - is that normal ? Or is something wrong with my setup ?

Then, I tried a webserver for the Teensy which uses the AT-Firmware. Had to flash the precompiled firmware from espressif (took 10 seconds), added a few lines in the webserversketch to match the FlexiBoard and voila..worked.. :) (I'll upload it as example..)
 
Last edited:
Once you get it working the support for it seems to be stable now - new IDE 1.6.12 and bump to ESP 2.3 from 2.1 version went smoothly on same machine.

Yes, I see more than a few warnings in the compile of the ESP code. That is in the 2.3 core - you can jump to beta releases where those may be fixed but then you may get other issues.

Indeed there are more 'moving parts' to put ESP_Arduino on the ESP - but the IDE common to Teensy and fully use of the 80 MHz WiFi processor CPU seemed to make it worthwhile - in some use cases the Teensy could even be - gasp - optional, onehorse made an ESP flight controller.

And as noted the ESP could be the gateway to OTA updates for the Teensy - and without some net connectivity the Teensy isn't onboard with IOT. And while there are other options for connectivity - they don't give you a "C" programmable processor to handle the fitful nature of 'networking' where timeouts of one or more seconds are part of the process and failure to 'keep it alive' with attention can mean it goes offline or misses data. Putting on WiFi costs a 100 mA or more - using the processor as a co-processor just makes use of that power drain.
 
Frank: Hopefully you have gotten more comfortable with the ESP Arduino usage? Once it is set up it is very useful - and just like Teensy to run the second processor - except you have to learn the WiFi and server stuff.

Note: FlexiBoard LEDs WORKING! - I found 4 undersized SMD green LED's (603's instead of 1206) I mounted to my FlexiBoard - that and 4 undersized resistors (402's instead of 603). I managed to get solder blobs to extend to all 8 parts usably (not pretty) without trashing any of them, and got as far as counting on them. I got fresh solder paste that worked well.

I'll get back with updates on starting fresh with ESP_Arduino - it is just a few simple steps.

Right now my ESP is getting an IP address - but the SPIFFS is hosed. I'm looking to format it. The myWebServer code puts out the .gz files if they are not found. I think mine did not run because I did not do the complete setup making myself an authorized user. Then I got confusion after the IDE trashed my SPIFFS area - it seems it was restored but not reformatted to a usable state - thus I saw two copies of the same two files - and the one I deleted was the active one. So now it powers up to a trashed SPIFFS that may be telling it the .gz files are there, so not re-written, but not usable. As I warned/noted it was the first time I didn't catch the IDE settings mistake and it made a mess. I'll get a fix for that and share it.
 
Tim, I had not the time, but i think that i can take a close look in the next days. I had to update my build-script for ttransfer for the new teensys (builds now all variants automatically incl. all hex-files) and other things..
 
I did not get to my other machine to set it up from scratch yet.

I did just put SPIFFS.format(); early in my start up - ran the sketch and then disabled it, should have put while(1); after it as SPIFFS wasn't ready until restart? Rebooted and the myServer code found the empty SPIFFS and dropped on the needed .gz files to power up with no config. ( could hardcode personal default config params I suspect ) and without that it went to AP mode. Hit it with my phone ( after another restart? ) and then dropped HTML from 'libraries\myWebServer\html' onto the FTP server and again Restart.

It came up working fine and the other server features using those html files ran fine. Set my local time zone and restarted, and then restarted again and the NTP server time was LIVE.

So again- don't let the IDE trash your SPIFFS data! The easiest correction would have been to dump a SPIFFS image from PC - but the above worked it out. Just restoring SPIFFS settings might look like it works - but there may be data corruption in the free space without the .format().

perhaps:
Code:
#define FORMAT_SPIFFS 0
  if ( 1 == FORMAT_SPIFFS ) {
    if ( SPIFFS.format() )
      Serial.println("SPIFFS format completed!! - RESTART");
    else
      Serial.println("SPIFFS format failed!! - RESTART");
    while (1);
  }
 
I have a working Flexiboard_Touchpaint on my display. It seem I had a bad touch display - a new one works. I just added heat+solder to the connector pins - no help.

I notice the LEDs - mine are all green but these show the selected color:
Code:
void ledColor(int color) {
// ...
    case ILI9341_CYAN: digitalWrite(LED3, HIGH); digitalWrite(LED2, HIGH); break;
    case ILI9341_MAGENTA: digitalWrite(LED3, HIGH); digitalWrite(LED0, HIGH); break;
// ...
 
Frank, I think Tim is just trying to confuse you ;)
The ESP8266 is (almost!) as easy to work with as Teensy...
I really can't imagine why anyone would use AT codes :(
Buy a NODEMCU board & play with it - they work just like Arduino/Teensy - plug & play :)
Here is a link to a SPIFFS based webserver: http://myiot.co.uk/min_spiffs.html
It serves files from the file system...
Try that with AT commands! ;)

Cheers

Ian
 
Ian, thank you :)

I think it is more simple:We have different goals.
You and Tim are describing a "How to make the ESP work" - that's great ! And it helped me to understand that thing and what it can do and what not. I tried a Blink-Sketch and much more. Fine.
It's a great, cheap little thing and can do a lot standalone (and with reasonable speed). I guess, there are better boards (without extra MCU like Teensy) than this to archive this goal !

But that's not what i want :) I want the ESP to communicate with the Teensy. With the "FlexiBoard" (or any other). I want to use it as a black-box, not more. Or at max as a co-processor to the Teensy.
My goal is to have a SIMPLE, cheap way to attach WLAN to the Teensy. That does not involve programming two different systems.. ideally: you do all on the teensy and just send some commands to the ESP and get data back or vice-versa.

If there is a better way than AT-Commands: GREAT ! (Hints are welcome!)Is there existing software that can do this and is better than the Espressif-AT-Firmware ? (Did you ever try it ? It is much better than the first 3rd-party-AT-crap).
There are arduino-libraries that are easy to use and hide the AT-Commands for you. You tell the teensy just "connect to this access-point, using this ssid and password, then connect to server yz and download the file abc.txt - without having to use any AT-Commands. And without flashing the ESP.

That's a very pragmatic point of view - but hey.. i'm sure that way, everyone get's his/her project (that need both- the teensy and the ESP) done in much less time than with programming two completely different systems...
 
Last edited:
Hm. No hardware flow-control :-(
I guess i have to dig into that code and add it...

Otherwise it looks perfect. But a flow control is essential.
 
Last edited:
I swapped out the SPI FLASH on the FlexiBoard and it still failed the same with TeensyTransfer, however Frank pushed new github FLASH SPI samples and they are working - so I may have trashed a 16 MB FLASH chip and re-soldered for no reason.
> FlexiBoard_SPIFlashEraseEverything
> FlexiBoard_RawSPIFlashTest
 
Status
Not open for further replies.
Back
Top