This built code runs on an ESP8266. I use the ESP-07 version which can be purchased here:
https://www.aliexpress.com/item/4001034304601.html?spm=a2g0o.order_list.order_list_main.847.2bf91802vsIPVL
CP2102 is the UART to TTL device for programming available here:
https://www.aliexpress.com/item/32637261853.html
How the code works currently:
Located here: https://github.com/skybrush-io/mavesp8266/blob/cm-develop
This code on the ESP8266 allows the flight controller to communicate with the server on the Ground Control Station (GCS) via wifi
Trial versions of the GCS can be downloaded here:
Server (which communicates with the ESP over wifi): https://skybrush.io/modules/server/#download
Live (which is the GUI for the server): https://skybrush.io/modules/live/#download
The default SSID and password for the ESP8266 is "Ardupilot" and "Ardupilot" respectively
This pin controls the power on/off of the flight controller on the drone
#define FC_POWER_CONTROL_PIN 4
Ground Control Station (GCS) can send a ‘sleep’ or ‘wake up’ command. This changes the state of FC_POWER_CONTROL_PIN to turn the flight controller on or off.
Note: this does not put the ESP8266 into sleep mode. The ESP always remains powered on.
When the ESP is powered up the FC_POWER_CONTROL_PIN (GPIO4 on the ESP) is high (3.3v)
When the wakeup button on the GCS is pressed the FC_POWER_CONTROL_PIN (GPIO4 on the ESP) pulls low (0V) for 400 milliseconds
When the sleep button on the GCS is pressed the FC_POWER_CONTROL_PIN (GPIO4 on the ESP) pulls high (3.3V) for 400 milliseconds
How I want the ESP8266 code to work:
When the ESP8266 is powered on I want GPIO4 output to be low (0V) and remain low.
When the wakeup button on the GCS is pressed GPIO4 output is to switch to high (3.3V) and remain high
When the sleep button on the GCS is pressed GPIO4 output is to switch to low (0V) and remain low
In addition I have connected a momentary push button on the drone to GPIO5. This button provides a 3.3V input to GPIO5 when pressed. When not pressed GPIO5 is pulled low (0V)
When GPIO5 input is high (3.3V) for more than 0.5 seconds the GPIO4 should change state i.e. from low to high or from high to low.
Can you please provide me a price for modifying the code as I require and providing me with the code and built files.
Posted On: August 17, 2024 03:19 UTC
Category: Mobile App Development
Skills:Node.js, Kotlin, Python, PHP, C++, React, Mobile App, JavaScript, WordPress, Next.js, QA Engineering, Microsoft Azure, AWS Development, Web Development, UI/UX Prototyping
Country: Australia
click to apply
Powered by WPeMatico