Week 14

Interface and Application Programing

brief.


a bit of context + plan for the week.

This weeek we are tasked with utilizing and creating an application to control an input or output device. I have been very interested in the versitility of the esp32 mcu chip and plan as using the XIAO wsp32-c3 as the micro controller for this week. Esp32 is great becasue it comes fully enabled with bluetooth, wifi, and esp now protocols to communicat wirelessly to different devices. Specifically the wifi cpabilities will be utilized this week to create a wireless access point to interface with our web application.

After digging through some resources and researching some use casees and capabilities I am interested in exploring the following pipelines to create applications. From easist to more comples we have the following

  • RemoteXY: an online drag and drop no code platform to creat GUI's for micro controllers.
  • Home Span: An arduino compatible library to creat home kit compatible accessories utilizing an esp32 micro controller. The library works off the existing homekit application interface. Very cool solution for IOS users
  • React firebase.: React t ocreat the bespoke graphical interface and firebase to hold data sent from an esp32 which then send the info to the react application. Atleast thats my baselin understanding. Still wraping my head a round this pipeline.

HeroShot

process // pipeline.

RemoteXY

For the Initial Test i will use RemoteXY to build a gui that can connect via wifi to the Xiao Esp32 to control a servo motor positioning via a slider. Rometoes builde is drag and drop and can be used connect a wide variety of bards through wifi,bluetooth, or ethernet. First we configure the boiards and modules we will be using. In our case we are Chose a esp32 board and select the onboard wifi module. From here we can drag and drop any modules and buttons that are necessary for our project. For our first test we will just use a slider. the idea is that th slide can control the position of our servo.

Once we build the interface we can select get source code. ReomteXy essential creats the intial frame work for arduino code we need to establish connection with our board and set up our interface. Then leaves void setup and loop sections open for ust o add our own code for our given application. Essentially we need to assign the buttions to the outputs we are using.

I used these docs to help finish the code as it relates to controlling the servo Its inportant that you add the appropriate remoteXY library from in the arduino IDE library. I also learned the the esp32 requires a specific library to contol a servo. Be sure to install the upropriate library. I chose the ESP32Servo library created by Kevin Harrington and John Bennet.

Working from the example docs i changed to the aproipriate library for the board I weas using and adjusted a few inputs. Then compile,upload and bam we had a working prototype. See hero video for app conectivty to board.

conclusion

This week i'm happy to have been able to explore the remoteXY workflow. Very cool to be able to control an output via a smart phone app that looks clean and simple. It is a great solution to quickly create a gui's that has a lot of prebuilt buttons,sliders, and radiobuttons. Being drag and drop is very nice. Tho doen side is it does take a soime time to connect to the Micro Controller and does require an app to run so its onlyt useful on a smart phone device. I would like to explore other options that can utilize IP adress and can be accessed across devices. For this i need a better understanding or websocket workflows and python to to creat e custom interfaces.

  • RemoteXY is great for starters.
  • Need to do more indepth reserach on custom gui' and websockets. Can you connect with out using wifi, accees sensor info across long distances?
  • I controlled a motor with my smart phone! Wohoo!

files

Click the link below to try for yourself!:

Download Sample File