Blueprint

data box

a box with buttons, knobs, a microphone, and a camera that uses esp32 to send data to a spreadsheet on my computer through google apps script will have lights for status and maybe a speaker to play fun sounds can transcript audio into text

Created by harqian harqian

3 views

0 followers

harqian harqian added to the journal ago

i was able to setup kicad and find my actual board!

kinda ditched wowki bc no pcb

downloaded kicad

learned about how pcb editors work while struggling through a lot of new stuff

  • there are schematics and then footprints, they are very different
  • have different layers of editing (start with schematics, then go to pcb, etc), each layer you get more specific and closer to the actual pcb
  • there are so many different types of esp32 T_T (like 50+)
  • claude code is surprisingly good at helping me with finding the correct version

anyways if anyone out there has one of these guys: https://docs.cirkitdesigner.com/component/495dcbec-f8fa-44f9-9d31-3e14dccef364/esp32-wroom-hw-394

here is a nice little repo with the correct schematics for kicad: https://github.com/syauqibilfaqih/ESP32-DevKit-V1-DOIT

CleanShot 2026-01-01 at 21.03.40

harqian harqian added to the journal ago

started designing the final combined thing!

considered how many pins i will need, and whether i will need the esp32-cam to send signals to components or not (probs not)

IMG_3148

then looked into online apps that have my version of esp-32 devkit v1, and found https://wokwi.com/projects/451561902878911489 after fiddling with a buncha different ones

  • fritzing
  • easyeda 🤮

i initially thought wokwi didnt have my model, but they do, just hidden in a github repo of hella micro controller models!

will be designing soon :)

harqian harqian added to the journal ago

connected camera data to my sheets!

IMG_3140

yay! thought it might be scary like audio but it was actually a decently smooth process

started with looking into how much work it would be to directly go from the chip to my google apps script compared to taking images from the internal server the default script hosted and going from there to the apps script.

snooped around in the example code for a pretty long time and then figured out that taking some parts of it might not be so hard, especially since there's literally a function that represents the functionality for the internal server, for just taking one picture and sending it as a response to a GET request to the internal server

took the code and started with a test for a button press, just a normal button press testing to light an LED

That worked

Then moved on to integrating the code that was supposed to work for the server as a response to a POST request with data

Looked at the structure and docs of the code specifically some HTTP types that I've not seen before as well as a returning methodology that I've not seen before using a pointer of a pointer. Isn't that crazy??? 🤯

The original code uploaded the JPEG in streams but I didn't want to use streams so I had to go into the documentation and find a different function that will convert the image type to a JPEG completely and then in one shot send it to my server

But then I realized that the images were already in the JPEG format so I didn't even need to do any of that 👍

The final barrier was like usual the conversion from binary data to Base64. Because sending that POST request with even with image/json as a content type, the data gets corrupted because it gets read into a JSON with characters.

After all that it worked out! Below is a demo :)

DEMO DEMO DEMO!

harqian harqian added to the journal ago

finally flashed functioning code to esp32 cam!

tried:

  • using the other esp32 cam
  • switching to using "ai thinker esp32 cam" in arduino ide for connection (didnt connect)
  • switch to using "ai thinker esp32 cam" board_config.h while using wrover module as the connection board type?? -> worked??

CleanShot 2025-12-26 at 21.43.57

IMG_3138
(two lights means its working)

CleanShot 2025-12-26 at 20.48.24@2x

im speechless...

until next time! will be writing firmware to on button press / hold send images to google apps script or something else :)

harqian harqian added to the journal ago

flashed code to esp32 cam but no functioning

i dont have a FTDI programmer, so ive been using an arduino...

the setup in question:
IMG_3132
mac so need adapter from usb c to usb a (haha its c -> a -> b)

was trying some things such as using different wiring; somehow found another tutorial with a different wiring schematic in the same style as the others

send something over just to check it and IT UPLOADED

(you cannot imagine my face when that happened btw)

i was very confused, and then immediately disconnected the wiring to test it

it did not show up in my connected wifi devices list, sad

went back and tried it again, this time stopped working!

tried some more things

  • upload settings (upload speed, flash rate)
  • updating esp board manager (previously downgraded to heed some advice given on reddit)

still no work

tried the hail mary of switching one of switching the usb connection to another one of the 3 ports
IMG_3132
worked????

from then on i would switch a port every time and it would work...

flashed the normal wifi code once more to check again that it wasnt working -> it wasnt working

then flashed some basic pin writing code to check that it was actually flashed -> ✅

void setup() {
  // put your setup code here, to run once:
  pinMode(12, OUTPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(12, HIGH);
  delay(1000);
  digitalWrite(12, LOW);
  delay(1000);
}

IMG_3131

then did the wifi code with some minimal led outputs -> basically told me nothing except for that it doesnt work (at least its not an issue with my wifi detection)

things to try next:

  • use other esp32 cam
  • connection to camera broken?
  • more comprehensive logging methods (since i dont have the FTDI, i cant get serial output)
  • wrong code? look for other codes (kinda doubt it bc its coming from the examples in arduino ide, but possibly)
  • try assuming the other board type etc now that i know how to consistently flash the thing

harqian harqian added to the journal ago

(prev) tried to get esp32 CAM working but couldnt connect!

IMG_3121 2

was following two different tutorials:

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html

Failed uploading: uploading error: exit status 2

tried:

  • rechecking the connections
  • switching out the esp32 cam (i bought 2)
  • holding reset button on esp32 cam while uploading
  • playing with uploading settings
    • instead of "esp32 Wrover module", using "ai thinker esp32-cam"
    • upload speed (using 115200 baud instead of default 921600; previously worked on esp32, this time no work)
    • flash frequency (80Mhz -> 40Mhz)
  • downgrading to a previous version of esp32 board manager libraries (3.0.7; someone on a forum said it was good)
  • use a different ground pin for the connection from ground to GPIO0 (there are two ground pins on the esp32-cam)

no luck unforch

harqian harqian added to the journal ago

(prev) numbers -> sheets & display using potentiometers

IMG_3087

components:

  • a 7 segment led display
  • a joystick (bc no buttons)
  • a potentiometer
  • many jumper wires
  • a brain (jk mine is burnt to a crisp alr)

started playing around with the 7 segment display, and accidentally burned out 3 of the displays (oops... ig it wasnt as tough as my fav white LED's which can take direct connection to 5V)

figured out how to use the joy stick the SW pin is just like buttons (maybe even easier!)

connected poentiometer to arduino, didnt work (who knew some pins just cant do analog input? needed to use another one)

connected 7 digit display, also didnt work (woah, converse of realization above is true? that is crazy... who knew); needed to use some output pins

connected switch, also didnt work (it was using ground from a different source! so there were different relative levels of voltage... first time hitting this issue)

after debugging for a bit (and me accidentally reading values from the clock pin (lmao that confused me so much)), i got it to work!

demo

hope you appreciate my janky 4 + 2 segment display... lol (will just use 4 leds on binary for the actual thing later)

harqian harqian added to the journal ago

(prev) audio -> sheets, transcripted (took me so long 💀)

phase 1: the first scuffle

so it started with a little INMP441 microphone.

wired it up

IMG_3067

started reading zeros using some code i found online. weird. looked into I2C (the comms protocol that the microphone uses) and added some debugging print statements—narrowed down the issue to be outside of the code.

after some beep testing, i realized i soldered the pins on with way too much solder so they were shorted T_T

would be able to get audio in the serial output: IMG_3066

fixed, then bumped into some google apps script issues (just cant use getFolderById for some reason??)

then it was 7pm i was like ok imma do this thing.

IMG_3115

so spoiler alert i didnt do it

opp #1: why does it have like no memory (give me back my python with infinite ram so i can be as inneficient as i want 😭)
opp #2: base64??
opp #3: google's redirect policy and error messages (400. That’s an error. Your client has issued a malformed or illegal request. That’s all we know.)

i slept at 2am and didnt wake up until 11:30


phase 2: ...

so i come back to this god awful (now amazing) project a couple of days later, and debug analytically. starting with a direct curl of a base64 wave form in .wav to my hosted web app, which succeeded. then, i back tracked. i tried sending over the exact same thing from my esp32 and it failed. ???

this was actually really good as it allowed me to figure out the problem. it was this ONE GOSH DARN LINE IN MY CODE THAT WAS SOMEHOW MALFORMING THE REDIRECT REQUEST:

CleanShot 2025-12-24 at 20.30.16@2x

(for some reason when i send something to my apps script web app, google redirects that request to some other url, and i have to follow it with my same request. this line unbeknownst to me would follow but then drop my requests and then cause an error, which of course told me nothing about what went wrong.)

after just changing it to http.setFollowRedirects(HTTPC_FORCE_FOLLOW_REDIRECTS);, i started seeing the first messages go through. i then hit a multitude of other issues: more memory issues, apps script permissions, base64 / binary (tried sending just binary, didnt work because corrupted to chars in the request), and random other bugs

but it finally worked 😭

the transcription after the audio was saved wasnt too hard

IMG_3114

harqian harqian added to the journal ago

(prev) set up the buttons -> sheets connections

was not crazy hard, although barely had any experience

needed to search up the schematic of the 4-pin buttons; my understanding is somewhat poor but it is that things across diagonally arent connected but then when button is pressed they are?

button_led (humble beginnings!)

programming the esp32 is kinda annoying bc it takes so long T_T (at least compared to arduino which is lightning fast)

button to sheets!

CleanShot 2025-12-24 at 20.13.03@2x
(an image for the requirement)

harqian harqian started data box ago

12/24/2025 8:13 PM - (prev) set up the buttons -> sheets connections

was not crazy hard, although barely had any experience

needed to search up the schematic of the 4-pin buttons; my understanding is somewhat poor but it is that things across diagonally arent connected but then when button is pressed they are?

button_led (humble beginnings!)

programming the esp32 is kinda annoying bc it takes so long T_T (at least compared to arduino which is lightning fast)

button to sheets!

CleanShot 2025-12-24 at 20.13.03@2x
(an image for the requirement)

12/24/2025 8:34 PM - (prev) audio -> sheets, transcripted (took me so long 💀)

phase 1: the first scuffle

so it started with a little INMP441 microphone.

wired it up

IMG_3067

started reading zeros using some code i found online. weird. looked into I2C (the comms protocol that the microphone uses) and added some debugging print statements—narrowed down the issue to be outside of the code.

after some beep testing, i realized i soldered the pins on with way too much solder so they were shorted T_T

would be able to get audio in the serial output: IMG_3066

fixed, then bumped into some google apps script issues (just cant use getFolderById for some reason??)

then it was 7pm i was like ok imma do this thing.

IMG_3115

so spoiler alert i didnt do it

opp #1: why does it have like no memory (give me back my python with infinite ram so i can be as inneficient as i want 😭)
opp #2: base64??
opp #3: google's redirect policy and error messages (400. That’s an error. Your client has issued a malformed or illegal request. That’s all we know.)

i slept at 2am and didnt wake up until 11:30


phase 2: ...

so i come back to this god awful (now amazing) project a couple of days later, and debug analytically. starting with a direct curl of a base64 wave form in .wav to my hosted web app, which succeeded. then, i back tracked. i tried sending over the exact same thing from my esp32 and it failed. ???

this was actually really good as it allowed me to figure out the problem. it was this ONE GOSH DARN LINE IN MY CODE THAT WAS SOMEHOW MALFORMING THE REDIRECT REQUEST:

CleanShot 2025-12-24 at 20.30.16@2x

(for some reason when i send something to my apps script web app, google redirects that request to some other url, and i have to follow it with my same request. this line unbeknownst to me would follow but then drop my requests and then cause an error, which of course told me nothing about what went wrong.)

after just changing it to http.setFollowRedirects(HTTPC_FORCE_FOLLOW_REDIRECTS);, i started seeing the first messages go through. i then hit a multitude of other issues: more memory issues, apps script permissions, base64 / binary (tried sending just binary, didnt work because corrupted to chars in the request), and random other bugs

but it finally worked 😭

the transcription after the audio was saved wasnt too hard

IMG_3114

12/24/2025 8:49 PM - (prev) numbers -> sheets & display using potentiometers

IMG_3087

components:

  • a 7 segment led display
  • a joystick (bc no buttons)
  • a potentiometer
  • many jumper wires
  • a brain (jk mine is burnt to a crisp alr)

started playing around with the 7 segment display, and accidentally burned out 3 of the displays (oops... ig it wasnt as tough as my fav white LED's which can take direct connection to 5V)

figured out how to use the joy stick the SW pin is just like buttons (maybe even easier!)

connected poentiometer to arduino, didnt work (who knew some pins just cant do analog input? needed to use another one)

connected 7 digit display, also didnt work (woah, converse of realization above is true? that is crazy... who knew); needed to use some output pins

connected switch, also didnt work (it was using ground from a different source! so there were different relative levels of voltage... first time hitting this issue)

after debugging for a bit (and me accidentally reading values from the clock pin (lmao that confused me so much)), i got it to work!

demo

hope you appreciate my janky 4 + 2 segment display... lol (will just use 4 leds on binary for the actual thing later)

12/25/2025 8 PM - (prev) tried to get esp32 CAM working but couldnt connect!

IMG_3121 2

was following two different tutorials:

A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html

Failed uploading: uploading error: exit status 2

tried:

  • rechecking the connections
  • switching out the esp32 cam (i bought 2)
  • holding reset button on esp32 cam while uploading
  • playing with uploading settings
    • instead of "esp32 Wrover module", using "ai thinker esp32-cam"
    • upload speed (using 115200 baud instead of default 921600; previously worked on esp32, this time no work)
    • flash frequency (80Mhz -> 40Mhz)
  • downgrading to a previous version of esp32 board manager libraries (3.0.7; someone on a forum said it was good)
  • use a different ground pin for the connection from ground to GPIO0 (there are two ground pins on the esp32-cam)

no luck unforch

12/25/2025 10 PM - flashed code to esp32 cam but no functioning

i dont have a FTDI programmer, so ive been using an arduino...

the setup in question:
IMG_3132
mac so need adapter from usb c to usb a (haha its c -> a -> b)

was trying some things such as using different wiring; somehow found another tutorial with a different wiring schematic in the same style as the others

send something over just to check it and IT UPLOADED

(you cannot imagine my face when that happened btw)

i was very confused, and then immediately disconnected the wiring to test it

it did not show up in my connected wifi devices list, sad

went back and tried it again, this time stopped working!

tried some more things

  • upload settings (upload speed, flash rate)
  • updating esp board manager (previously downgraded to heed some advice given on reddit)

still no work

tried the hail mary of switching one of switching the usb connection to another one of the 3 ports
IMG_3132
worked????

from then on i would switch a port every time and it would work...

flashed the normal wifi code once more to check again that it wasnt working -> it wasnt working

then flashed some basic pin writing code to check that it was actually flashed -> ✅

void setup() {
  // put your setup code here, to run once:
  pinMode(12, OUTPUT);

}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(12, HIGH);
  delay(1000);
  digitalWrite(12, LOW);
  delay(1000);
}

IMG_3131

then did the wifi code with some minimal led outputs -> basically told me nothing except for that it doesnt work (at least its not an issue with my wifi detection)

things to try next:

  • use other esp32 cam
  • connection to camera broken?
  • more comprehensive logging methods (since i dont have the FTDI, i cant get serial output)
  • wrong code? look for other codes (kinda doubt it bc its coming from the examples in arduino ide, but possibly)
  • try assuming the other board type etc now that i know how to consistently flash the thing

12/26/2025 - finally flashed functioning code to esp32 cam!

tried:

  • using the other esp32 cam
  • switching to using "ai thinker esp32 cam" in arduino ide for connection (didnt connect)
  • switch to using "ai thinker esp32 cam" board_config.h while using wrover module as the connection board type?? -> worked??

CleanShot 2025-12-26 at 21.43.57

IMG_3138
(two lights means its working)

CleanShot 2025-12-26 at 20.48.24@2x

im speechless...

until next time! will be writing firmware to on button press / hold send images to google apps script or something else :)

12/27/2025 9 PM - connected camera data to my sheets!

IMG_3140

yay! thought it might be scary like audio but it was actually a decently smooth process

started with looking into how much work it would be to directly go from the chip to my google apps script compared to taking images from the internal server the default script hosted and going from there to the apps script.

snooped around in the example code for a pretty long time and then figured out that taking some parts of it might not be so hard, especially since there's literally a function that represents the functionality for the internal server, for just taking one picture and sending it as a response to a GET request to the internal server

took the code and started with a test for a button press, just a normal button press testing to light an LED

That worked

Then moved on to integrating the code that was supposed to work for the server as a response to a POST request with data

Looked at the structure and docs of the code specifically some HTTP types that I've not seen before as well as a returning methodology that I've not seen before using a pointer of a pointer. Isn't that crazy??? 🤯

The original code uploaded the JPEG in streams but I didn't want to use streams so I had to go into the documentation and find a different function that will convert the image type to a JPEG completely and then in one shot send it to my server

But then I realized that the images were already in the JPEG format so I didn't even need to do any of that 👍

The final barrier was like usual the conversion from binary data to Base64. Because sending that POST request with even with image/json as a content type, the data gets corrupted because it gets read into a JSON with characters.

After all that it worked out! Below is a demo :)

DEMO DEMO DEMO!

12/27/2025 10 PM - started designing the final combined thing!

considered how many pins i will need, and whether i will need the esp32-cam to send signals to components or not (probs not)

IMG_3148

then looked into online apps that have my version of esp-32 devkit v1, and found https://wokwi.com/projects/451561902878911489 after fiddling with a buncha different ones

  • fritzing
  • easyeda 🤮

i initially thought wokwi didnt have my model, but they do, just hidden in a github repo of hella micro controller models!

will be designing soon :)

1/1/2026 - i was able to setup kicad and find my actual board!

kinda ditched wowki bc no pcb

downloaded kicad

learned about how pcb editors work while struggling through a lot of new stuff

  • there are schematics and then footprints, they are very different
  • have different layers of editing (start with schematics, then go to pcb, etc), each layer you get more specific and closer to the actual pcb
  • there are so many different types of esp32 T_T (like 50+)
  • claude code is surprisingly good at helping me with finding the correct version

anyways if anyone out there has one of these guys: https://docs.cirkitdesigner.com/component/495dcbec-f8fa-44f9-9d31-3e14dccef364/esp32-wroom-hw-394

here is a nice little repo with the correct schematics for kicad: https://github.com/syauqibilfaqih/ESP32-DevKit-V1-DOIT

CleanShot 2026-01-01 at 21.03.40