Supplementary material for MacGyvering in vision science: Interfacing systems that are not supposed to work together
The materials included here are the building blocks for the workshop of the same name on the VSS 2019 conference. The target audience is people who know the basics of programming (variables, loops, if statements, etc) but haven't done any hands-on work with hardware before.
The kit consists of:
- A NodeMCU V3 board
- A common cathode RGB led
- A Bosch BME280 (temperature, humidity, and air pressure) sensor
- A TCS23725 RGBC sensor
- An SSD1306-based OLED screen
- An SD card breakout board with a 8 GB micro SD card
- Two breadboards with suitable wires ...so if you didn't get your own, you can just buy the relevant bits. As of 2019, all these components are easily obtainable.
The device is being programmed with Arduino and its support libraries. I organised some examples and tutorials into various themes. All .ino
files are loadable on their own.
- Getting started: Blinking the built-in LED: If you are the tl;dr type, follow this and dive in!
- Programming in C: This is a pretty superficial C-tutorial that only includes relevant bits to this material.
- The NodeMCU V3 board: What it is and why it is good.
- Preparing your Arduino environment: Board support package and library management.
- GPIO, ADC, I2C, SPI, PWM, and other fancy acronyms: and what they are used for.
- Debugging your own code: You will need this, no matter what you do.
- Blinking an LED in weird colours: How to use the RGB LED.
- Measuring the environment with the BME sensor: Temperature, humidity, pressure.
- Measuring colour temperature (not very accurately) with the TCS sensor: Using the Adafruit library.
- Displaying graphics à la Adafruit GFX library: Text, fonts, and animation.
- Accessing the SD card: Dumping data into files, kinda slowly.
- Wifi on-board!: How to connect your thing to the Internet.
- Concurrency: Interrupts and timers: Not quite parallel computing, but close.
This hardware can be used for way more than just the examples shown above. Further examples are included here.