This tutorial helps you quickly scale up the sensing area of your single Mini GaussSense by mounting 2x2 Mini GaussSense together!
Hardware Materials
Please prepare the following hardware materials:
- 4 Mini GaussSense
- 1 Mini GaussSense 4-way Breadboard Adapter
- Magnet
- 1 Breadboard
- 1 Arduino Board & 1 USB Cable for the Board
- 10 Jumping Wires
Setting up Programming Environment
Also, please setup the following environments:
- Setup the Arduino Software (If you have Arduino installed already, you can skip this step.)
- Setup the Processing IDE (If you have Processing IDE installed already, you can skip this step.)
- Setup the GaussSense SDK for Processing
- Download the Arduino Firmware for 2x2 Mini GaussSense, this file is going to be uploaded to the Arduino board
Wiring Circuit
Please connect all 10 wires between the Arduino board and the 4-way Mini GaussSense Breadboard Adapter as follows:
Arduino | Mini GaussSense |
---|---|
5V | V |
GND | G |
A0 | A0 |
A1 | A1 |
A2 | A2 |
A3 | A3 |
2 | S0 |
3 | S1 |
4 | S2 |
5 | S3 |
Upload Arduino Firmware for 2x2 Mini GaussSense
Please open the Mini_GaussSense_V1.ino
in the Arduino Software. This code can be used for both single and multiple Mini GaussSense sensors.
However, we will have to modify some parameters this time.
First, change the value of MINI_GAUSSSENSE_AMOUNT
to 4, since we now have 4 Mini GaussSense.
const int MINI_GAUSSSENSE_AMOUNT = 4;
Second, set analogInPin
to the 4 pins connected to Mini GaussSense Adapter.
const int analogInPin[] = {A0, A1, A2, A3}; // Set the analog pins used
Then, you are good to upload this code to your Arduino board! (Don't forget to check your board and serial port settings in the Tools menu.)
Again, in Processing IDE open File > Examples… > Contributed Libraries > GaussSense SDK for Processing > Basics to load example e1_HelloGaussSense
.
Before running this example, change the width
and height
values to 2
and 2
in the constructor of GaussSense class.
// Initialize the 2x2 GaussSense Grid gs = new GaussSense(this, GaussSense.GSType.GAUSSSENSE_MINI, 2, 2, Serial.list()[Serial.list().length - 1], 115200);Back to Tutorials