A place to put your YouTube video that is ESP8266 related.
User avatar
By HermannSW
#78604 OK, now I did 1st drop onto target, remote from laptop instead of ESP01s attached to transmitter.

This is setup, payload 17.5cm above ground, you can see black SG17 servo as part of drop mechanism.
Superglued to bottom front of drone, near vertical direction drone camera in front:
Image


This is same scene, 1280x960 photo from drone camera:
Image


I did take a video and was surprised to see that this 2nd of my drones in fact has only 0.3MP camera (640x480@30fps). My first same E52 model drone has 0.4MP 720x576@25fps camera. Then I converted the video to same speed animation (adding context images):
https://www.youtube.com/watch?v=Iz0sDljiWX8&feature=youtu.be
Image


What is wrong:
The camera is positioned exactly above center of target.
Because that is displayed near bottom, camera currently does not look perfectly vertical.

I was not sure whether payload would not cover too much of camera view.
It does not, good that it can be seen a little at bottom of view.

P.S:
Counting frames by single stepping youtube video, from 1st move of payload until touchdown, gives 13 frames.
Therefore it takes 13/30=0.43s.
Free fall formula for 17.5cm says it takes 0.19s.
From previous posting we know that O-cube is free to move vertical after 67ms.
Therfore it takes 0.43-0.19-0.067=0.173s until O-cube is out between R and P cubes for free fall.
User avatar
By HermannSW
#78826 You have seen the ESP01s superglued to drone transmitter a few postings back, and the ESP01s superglued to drone in previous posting.

Below video shows testing the software on transmitter ESP01s side. Instead of triggering payload drop, for testing pressing the new button superglued to transmitter (or here below USB adapter module) will turn transmitter as well as drone ESP01s builtin LED on, releasing button turns both LEDs off.

What is interesting, is that there is no special software installed on the drone ESP01s MicroPython. That ESP01s just gets flashed with MicroPython, then only once a serial connection is needed to execure "import webrepl_setup" and enable WebREPL. From then on that ESP01s MicroPython only gets accessed via WebREPL remotely.

The complete remote control of drone ESP01s MicroPython is done via uwebsocket module by transmitter MicroPythpn executing drone MicroPython commands remotely. It is so easy, just look into the code and watch the video, you can easily match code locations with video scenes:
https://stamm-wilbrandt.de/en/youtube/flip_button.py
Code: Select allimport network
import uwebsockets.client
import time
from machine import Pin

but = Pin(0, Pin.IN, Pin.PULL_UP)
led = Pin(2, Pin.OUT)
led.value(0)

sta_if = network.WLAN(network.STA_IF)
sta_if.active(True)
sta_if.connect("MicroPython-b7e5c8", "12345678")

while not(sta_if.isconnected()):
    led.value(1-led.value())
    time.sleep(0.2)

led.value(1)
websocket = uwebsockets.client.connect('ws://'+sta_if.ifconfig()[2]+':8266/')

def wait_for_prompt():
    resp = ""
    while not(">>> " in resp):
        resp = websocket.recv()
        print("< {}".format(resp))

def do(cmd):
    websocket.send(cmd+"\r\n")
    wait_for_prompt()

resp = websocket.recv()
assert resp == "Password: ", resp

do("abcd")

do("import machine")

do("led = machine.Pin(1, machine.Pin.OUT)")

do("led.value(1)")

while True:
    if but.value() == 0:
        led.value(0)
        do("led.value(0)")

        time.sleep(0.1)
        while but.value() == 0:
            time.sleep(0.1)

        led.value(1)
        do("led.value(1)")

    time.sleep(0.1)




P.S:
This is the first time I did put background music to a youtube video.
I found free music, all I had to do is to mention it in youtube video description.
I did put the music live to the video, placed an external computer loudspeaker directly besides the smartphone recording the video.
I had to turn the speaker very loud for the result you can see&hear ;-)
User avatar
By QuickFix
#78837 8-)

HermannSW wrote:I had to turn the speaker very loud for the result you can see&hear ;-)

You do know things like video editing software exists? :lol: