- Mon Oct 08, 2018 5:45 pm
I am late, but there is a reason:
I need one hand for up/down stick and the other hand for left/right/forward/backward stick of drone transceiver.
I simply miss a 3rd hand needed to press return key of mobile Pi wireless keyboard
So I wanted to replace the mobile Pi by another ESP01s running MicroPython. First I wanted to know whether MicroPython can run a WebREPL websocket client in order to remote control the ESP01s attached to drone. And today I was able to do so, and the code for remote execution of drone ESP01s MicroPython commands is so simple(!), see:https://forum.micropython.org/viewtopic.php?f=2&t=5351&p=30829#p30829
After the software side was clear I did need 3.3V for the transmitter ESP01s. The step-down converter accepts 5V maximal, so I could not use all 4 AA batteries as input. Instead I did solder cables so that I get 3.3V step-down converter input voltage from 3 of the 4 AA batteries. Most importantly I did need a micro button at a place that a finger can easily press while still controlling both transmitter sticks. That was all that was needed, here is the connection diagram (1853 byte share URL
After soldering and first functional test I did superglue the step-down converter, the ESP01s connectors and the micro button to the transmitter. This is the result:
In the photo I did a second functional test, set built in LED value to value read from micro button. I pressed the button, therefore its value was 0, and therefore built in LED is lit because of reverse logic.
This was the test script used via weplrepl_client.py connection to the transmitter ESP01s:
Code: Select all
$ webrepl_client.py 192.168.178.122
MicroPython v1.9.4-481-g3cd2c281d on 2018-09-04; ESP module with ESP8266
Type "help()" for more information.
>>> import time
>>> from machine import Pin
>>> led = Pin(1, Pin.OUT)
>>> but = Pin(2, Pin.IN, Pin.PULL_UP)
>>> while True:
- make ESP01s attched to drone running MicroPython payload.py module the wireless access point
- let ESP01s attached to transceiver connect to the AP
- run MicroPython WebREPL websocket client on transceiver ESP
- use micro button to trigger drone payload drop
Now that there is a full OTA WebREPL connection between transmitter and drone ESP, more complex projects can be attacked [after doing (hopefully) the lost in trees drone and lost plane rescue part by dropping payload on them from above]