/SoftCircuitsWorkshop

Arduino sketches for the Catch 2020 Soft Circuits Summer Camp!

Primary LanguageC++

SoftCircuitsWorkshop

About

Here you will find all the software (Arduino sketches) for the Summer 2020 Soft Circuits Summer School at Catch: https://www.catch.dk/softcircuits/ Many sketches are adapted from the Adafruit Circuit Playground library

To Download

Go to CODE (green button) > Download as .Zip After the download, unzip the files. Double click each file to open in Arduino!

Troubleshooting

I'm getting a "Can't Find Port" error: try pressing the "reset" button on the Circuit Playground twice!

Output Functions Cheat Sheet


LEDS
CircuitPlayground.setPixelColor(0, 255, 255, 255); // (which pixel?, red, green, blue)
CircuitPlayground.clearPixels(); // turns all neopixels off by clearing the data!

SPEAKER
CircuitPlayground.playTone(2000, 1000); // (tone in hz, duration)

PRINT STATEMENT
Serial.println("This statement will print to the serial monitor");

POSITION SERVO
myservo.write(90);

Comparison Operators & Logic

AND &&
Example:
if (capVal > 200 && capVal < 400){ Serial.print("touched")};

OR ||
Example:
if (capVal > 200 || capVal < 400){ Serial.print("touched")};

NOT !
Example:
if !(capVal < 800){ Serial.print("touched")};

EQUALS ==
Example:
if (capVal == 800){ Serial.print("touched")};