WEEK 13 | INTERFACE DESIGN



ESP32 cam communicate with a server

*see also interface and application programming week*
In this point, because working on my final project, all the definitions of the specific work is kind of blair.
Now, everything is already about programming, networking, fabrication and communicating. This week I wanted to
manage to do two things: to finally program the board on my computer, making it connect to my phone's hotspot
so I won't be dependant on the slow MIT wifi - and also because in the desert it can be super useful to connect to the hotspot.
I was lucky to get to sit with Eyal, that knows a lot about websites programming and interfaces.
To manage to do that, I subscribed to google clouds, so be able to get a server that can communicate with the camera.
We talked about it a lot, and thought that the best way will be to use Node.js and to program the camera to take a photo
every 0.5 seconds and send it to the server. This was my way to not get raspberry pi to stream from the camera.
But before I could be able to get photos from the camera, We tried to just get anything from the camera.
Eyal showed me how to use node.js, it was hard, as someone without any coding background, but I got the basics.
So I got a lousy website address: http://totemic-stack-260619.appspot.com/ and I coded it to communicate with the ESP32.
I used Arduino and node.js, so everytime I pressed the reset botton on the board, the website would get a string
added to the hello world.
I hope evantually to succeed in sending videos there too!




Few days after, I tried again, this time to actually live stream a video and not just strings of text.
First, one very happy thing was that I managed to program the board and finally understood what was the problem:
apparantly, that was a matter of timing: you should press the reset botton and not let go, and just than upload the arduino code,
and stop pressing the botton when it's starts blink. it took me three weeks to get that!
To do the live stream, I used this tutorial,
and
this code that Eyal found online.
following this wasn't so hard. Tomas from CBA stopped by to talk about my future board, and we could live stream our talk for the first time!