22. November 2022
Networking and Communications
This week’s assignment was to design and build a wireless node.
Design
I decided to create a board using the wireless ESP32 chip. I redesigned the ESP32-WROOM board with additional headers routed from the pins, ground, and VCC.
I then routed the paths.
Milling
After designing my board, I milled it. Initially, the individual traces for the ESP board did not mill properly.
Hence, I had to adjust the footprint and decreases sizes of the pads connecting to the chip.
Stuffing
I then stuffed my board. Soldering the ESP board took some time as the pins were extremely small.
Programming
Finally, I programmed my board to light up when an LED is plugged in.
1const int LEDPIN = 5;
2const int BUTTON = 9;
3
4void setup() {
5 pinMode(BUTTON, INPUT_PULLUP);
6 pinMode(LEDPIN, OUTPUT);
7
8}
9
10void loop() {
11 // put your main code here, to run repeatedly:
12
13 int sensorVal = digitalRead(BUTTON);
14 if (sensorVal == HIGH) {
15 digitalWrite(LEDPIN, LOW);
16 } else {
17 digitalWrite(LEDPIN, HIGH);
18 }
19
20}
Overall, the input and output devices work very well!