There are several reasons I could have headache – I mean the real, physical headache – like, just before catching a cold, or when being exposed to certain chemicals such as when I stay at the new building or the clothing shop for too long. Another reason is when the weather is getting worse. I could really tell it would start raining half day before. It is widely know that some people are sensitive to air pressure changes, especially when it is low.
I just want to prove that this really applies to me – scientifically. I can record all the air pressure changes and also manually record when my headache starts and ends. The system works as below:
- A barometer sensor with WiFi capability. This IoT device keeps updating the web server with the new pressure values. There could be two sensors – one in the office, another at home. Multiple sensors may compensate the potential sensor errors.
- The web server can send an alert email when the air pressure is getting low. Yeah there is nothing I could do prevent the headache but it could be fun to be notified before the symptom starts.
- I could manually record how bad the headache is at each time – then I can further examine the correlation with the air pressure changes later.
To achieve this, I ordered two barometer sensor boards BMP280 Barometric + Temperature sensor breakout from Adafruit, $9.95 each. I ordered through Digikey. The package arrived at my office next day. Awesome!
Also I ordered the controller Seeed Studio XIAO ESP32C3 of 3pcs pack. $12.14 including shipping which took nine days. Awesome price!
This IoT controller has RISC-V, WiFi, Bluetooth, UART, I2C, SPI in a very small form factor.
The controller is Arduino-compatible so the first thing I did was to install Arduino IDE on my office PC. After going through Getting Started manual of ESP32C3, I could successfully run LED Blink program. I didn’t have LED so I used my cheap oscilloscope which did the nice job.
I then go back home and tried the same thing with my Mac. No issue in compiling, loading and executing the program.
One issue with Arduino IDE with both Windows and MacOS is the debugger doesn’t run with the message: OpenOCD: GDB server quits unexpectedly. Not sure what is causing this but at least printf over serial terminal works so I will be fine in debugging.