This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <SoftwareSerial.h> | |
| #include <FatReader.h> | |
| #include <SdReader.h> | |
| #include <avr/pgmspace.h> | |
| #include "WaveUtil.h" | |
| #include "WaveHC.h" | |
| SoftwareSerial mySerial(6, 7); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <SoftwareSerial.h> | |
| #include <Adafruit_NeoPixel.h> | |
| #ifdef __AVR__ | |
| #include <avr/power.h> // Required for 16 MHz Adafruit Trinket | |
| #endif | |
| // Which pin on the Arduino is connected to the NeoPixels? | |
| #define PIN1 12 // On Trinket or Gemma, suggest changing this to 1 | |
| #define PIN2 13 // On Trinket or Gemma, suggest changing this to 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Stepper.h> | |
| const int numSteps = 512; | |
| // initialize the stepper library on pins 8 through 11: | |
| Stepper stepper1(numSteps, 8, 9, 10, 11); | |
| void setup() { | |
| // set the speed at 20 rpm: | |
| stepper1.setSpeed(20); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Stepper.h> | |
| const int numSteps = 512; | |
| // initialize the stepper library on pins 8 through 11: | |
| Stepper stepper1(numSteps, 8, 9, 10, 11); | |
| void setup() { | |
| // set the speed at 20 rpm: | |
| stepper1.setSpeed(20); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Stepper.h> | |
| const int numSteps = 512; | |
| // initialize the stepper library on pins 8 through 11: | |
| Stepper stepper1(numSteps, 8, 9, 10, 11); | |
| void setup() { | |
| // set the speed at 30 rpm: | |
| stepper1.setSpeed(30); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const int switchPin = 2; // switch input | |
| const int motor1Pin = 3; // H-bridge leg 1 (pin 2, 1A) | |
| const int motor2Pin = 4; // H-bridge leg 2 (pin 7, 2A) | |
| const int enablePin = 9; // H-bridge enable pin | |
| void setup() { | |
| // set the switch as an input: | |
| Serial.begin(9600); | |
| pinMode(2, INPUT); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int incomingByte; | |
| void setup() { | |
| Serial.begin(9600); | |
| pinMode(8, OUTPUT); | |
| } | |
| void loop() { | |
| int potVal1= analogRead(A0); | |
| int potVal2 = analogRead(A2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var serial; //variable to hold an instance of the serial port library | |
| var portName = '/dev/tty.usbmodem14411'; //fill in with YOUR port | |
| var pot1 = 0; | |
| var pot2 = 0; | |
| function setup() { | |
| createCanvas(600, 400); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void setup() { | |
| Serial.begin(9600); | |
| pinMode(9, OUTPUT); | |
| pinMode(10, OUTPUT); | |
| pinMode(A0, INPUT); | |
| pinMode(A2, INPUT); | |
| } | |
| void loop() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void setup() { | |
| Serial.begin(9600); | |
| } | |
| void loop() { | |
| int photoVal = analogRead(A0); | |
| Serial.println(photoVal); | |
| // delay(500); | |
| float freq = map(photoVal,0,1023,100,1000); |
NewerOlder