Week 13

Interface and Application Programming

This week's project I am going to try to tie it back to my final project which uses motors by creating an interface that moves motors.

Documentation

Last Week Tie In

Last week I was able to create a simple web server that turned on a motor. This week on the same Webserver I am going to give the option of multiple colors and essentially create the UIUX of my final project using a servo and then plotting the output of the servo.

Updating Website

This week I am once again consulting chat to help me with setting up the graph part of the website. according to chat these are the steps that I need to follow

  • 1. Set up Arduino to be able to send the servo's data
  • 2. Get the ESP32-C3 to recieve that data
  • 3. Set up the webserver with the esp32c3 (which I already did)
  • 4. Display the data on the webserver
  • I used the code it gave by immediately ran into a few errors including the fact that there was no servo library. I had previously done some googling and found a library for using the ESP32 with servos and used the library instead. Hopefully that will fix the main issue and it will be able to upload correctly

    Back to the wifi

    I didn't actually question how websites could possibly make changes to my physical board but appartently the way that it makes changes is by visiting specific websites. By visiting the website an action will be performed. So Apparently I have two small messups: for one i followed the tutorial for the wrong microcontroller and also my servo code did work however the connection since it was by breadboarding was more than a bit suspicious. So I just have to follow a new tutorial and it should all work out! I was able to create the WiFi!! However, I am now trying to copy the code to turn on an LED light to see how creating a website works and then adapting it from there. unfortunately it doesnt open the website. I've been googling this for at least half an hour and I still can't seem to find any acceptable code that would work. As a last resort I went on chatgpt to see if it could help me out and now it is telling me to download some library. OH MY GOD it finally worked. I had to enter the IP address and now I am going to try to see if I can go to a different page as well. AND IT WORKS AS WELLLLL.

    Connecting Webserver to Servos

    I was also able to ask Chat how to set up a button so now that I have that I just need to figure out how to program the servos to move when I am on the second webpage. I was able to code it and run it but I'm still running into the same issue where the servo doesn't move because the esp32c3 isn't well connected so i quickly drew up a schematic and PCB that should connect the servo to the esp32c3.