Testing with Arduino

Testing analog sensors 

Analog sensors, e.g. LDR, pressures sensor, potentiometer, etc. 

Steps 

1. Connect your sensor to "Analog1" snaps on the soft PCB, you can use crocodile clips for rapid testing

2. Connect INFINITE mainboard to your PC through the USB cable

3. Open Arduino IDE, open the AnalogReadSerial sketch by clicking File > Examples > 01.Basics > Analog Read Serial

4. Change the code int sensorValue = analogRead(A0); to int sensorValue = analogRead(A5);

5. Go to the Menu, click Tools > Port > /dev/cu.usbmodem146201(Adafruit Feather M0)

6. Click Upload icon on the top left of the window, when you see "Done uploading", open the serial monitor by clicking the icon on the top right corner

7. Now you should see numbers are scrolling on the window. Interact with your sensor, numbers should increase significantly, and decrease once you release the sensor. The range of number should be within 0-1023

Testing digital sensors 

Digital sensors, e.g. switch sensor. Or you can use analog sensors as digital sensors, e.g. sound detection sensor and proximity sensor.

Steps 

1. Connect your sensor to "Digital 1" snaps on the soft PCB, you can use crocodile clips for rapid testing. (Connect sensor to "Digital 0" if using proximity sensor or sound detection sensor)

2. Connect INFINITE mainboard to your PC through the USB cable

3. Open Arduino IDE, open the DigitalReadSerial sketch by clicking File > Examples > 01.Basics > DigitalReadSerial

4. Change the code  int pushButton = 2; to int pushButton = 21; (If using proximity sensor or sound detection sensor, change to int pushButton = 12;)

5. Go to the Menu, click Tools > Port > /dev/cu.usbmodem146201(Adafruit Feather M0)

6. Click Upload icon on the top left of the window, when you see "Done uploading", open the serial monitor by clicking the icon on the top right corner

7. On the serial monitor window, when the switch is realsed, you should see "0" is scrolling, and "1" if the switch is closed