Making a robo-car be controlled using TouchOSC and esp8266-esp1

Hey everyone,
I have a leftover 2 wheeled robo-car that I developed for school purposes as a line tracker - bump sensor search and rescue style vehicle. I also messed around with programming an IR tv remote to control it but it’s slow and laggy.

Now that I’ve done it and Learnt it the car has been sitting around since I don’t have a tape track with obstacles set up ever.

My idea is to rehash it into a controllable car from my iphone using touchOSC and the esp8266 wifi pcbs. I’ve programmed AT commands and done web server hosting using zigbee but have no experience with getting the esp8266 up and running with arduino. I’ve hunted around and found a video of a guy on YouTube doing exactly what I wanted with touch osc and 2 motors however there was no links to documentation. Most of the other esp8266 beginner tutorials are in the neighbourhood of creating a web hosting or server arduino.

I’m thinking my best option is to set the esp8266 as an access point, then just connect my iPhone to that wifi point to keep things simple. This way I can just set an ip in touch osc and forget it regardless of if I’m home or somewhere else. The ap command sheet for the 8266 seems pretty straight forward. My main lack of understanding is in making the apps buttons and slider outputs something that the wifi module transfers to the arduino

Since it’s been close to a year since my last zigbee project and first with esp8266 I have a few questions.

  1. is it necessary to reflash my esp8266 chips? I don’t know what firmware they have on them but I also don’t have an ftdi programmer. I know with zigbee issues only ever came up if you were using two of them together and they had different firmware. Would this be similar?

  2. what is the ch-pd pin on the esp8266.

  3. with only 2 gpio I’d be limited to controlling only my 2 motors and unable to send forward/backward commands to the arduino. Is that a correct or incorrect assumption?? I suppose I could use 50% adc values and just code forward back into arduino.

  4. with touch osc how would I setup to know what buttons on the app correspond to something the arduino can interpret. Are the midi channels the allocation? Would this require additional programming of the esp8266?

  5. with zigbee it was a little easier due to the micro USB to reprogram but using an ftdi programmer (say I buy one) is there any software available that makes reprogramming the esp8266’s easier without having to do it in programming environment/IDE?

  6. how to you determine the ip and mac addresses of esp8266? Just code arduino to retrieve them in a test program? The zigbees came with stickers and the mac addresses taped to them.

Thanks all in advance.

  1. It's not absolutely necessary, but it's going to be much, much easier than using AT commands.

  2. Read this Beginner's Guide to the ESP8266.

  3. You actually have 4 GPIO pins: GPIO0, GPIO1 (TX0), GPIO2 (TX1), GPIO3 (RX0). That's enough to control two H-bridges for two motors, and let them run in two directions.

  4. OSC is completely different from MIDI. It has no channel concept. Read the OSC specs here. You can use this Arduino OSC library.

  5. An ESP-01 is just not meant to be programmed as a stand-alone module. You'd be much better off with a WeMos D1 mini or a NodeMCU or similar. They have a USB interface and automatic reset and program circuitry on board, so you can just plug it into your computer and hit upload, just like with a normal Arduino. See the link in point 2 for more information on programming the ESP8266.

  6. Use mDNS or give it a fixed IP address. You don't need the MAC address. (See chapter 5 of the link in point 2 for an explanation of TCP/IP.) If you use the ESP in AP mode, and you connect your phone to the ESP directly, the IP address is always (by default).


Thanks so much pieterP.