Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

83 total results found

Connecting a Potentiometer

Physical Computing Tutorials

...pe of potentiometer to use is a 10KΩ potentiometer, that means the ...tween pin #1 and #3 is fixed at 10KΩ or thereabouts, and that the ... blink at a rate between 0ms to 1023ms, this is because the functi ...gRead returns a value between 0-1023. #define ledPin 13 #define po...

How to use DFPlayer Pro to play Music

Physical Computing Tutorials

...ontrol 0–30 steps 0–100 steps ✅ Finer volume con ...e wire connection!"); delay(1000); } /*Set volume to 20*/ ...art playing"); //Fast forward 10S DF1201S.fastForward(/*FF = * .../10); Serial.print("File number:"); //G...

Using a Force Sensor

Physical Computing Tutorials

...larized so it's doesn't matter which pin to 5V or GND. Power (one end to 5V) Ground (one end to GND with 10K resistor) Signal (GND side to ...alue; //sensor value range: 0-1023 //200 is light touch //500 i ...talWrite(13, LOW); } delay(100); }

Using a Whadda Vibration Motor Module

Physical Computing Tutorials

...13; //motor transistor is connected to pin 3 void setup() { pinMode(motorPin, OUTPUT); } void loop() { digitalWrite(motorPin, HIGH); //vibrate delay(1000); // delay one second digi ...LOW); //stop vibrating delay(1000); //wait 50 seconds. }

How to use 7-Segment LED Backpack

Physical Computing Tutorials

...r thats too long matrix.print(10000, DEC); matrix.writeDisplay ... matrix.writeDisplay(); delay(10000); // print with print/println for (uint16_t counter = 0; counter < 9999; counter++) { matrix.println(counter); matrix.writeDisplay(); ...

Using an MFRC522 RFID reader

Physical Computing Tutorials

... of that model. SDA - Digital 10 (SS) SCK - Digital 13 (SCK) MOS ...t above #define SS_PIN 10 // Configurable, see typical pin layout above MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance void setup() { Serial.begin(9600...

Using Arduino Leonardo to send USB MIDI data

Physical Computing Tutorials

...Arduino to applications like MadMapper, Max and Ableton Live. In or ...y(1500); // controlChange(0, 10, 65); // Set the value of contr ...oller 10 on channel 0 to 65 } void noteOn(byte channel, byte pitch, byte velocity) { midiEventPacket_t noteOn = ...

How to connect a Light Dependent Resistor (LDR)

Physical Computing Tutorials

...(Power) (2)leg split to GND via 10K resistor (2)leg split to A0 ...ad() to get a integer between 0-1023 representing the voltage, whe ...re 0 is 0V and 1023 is 5V. The code below uses the serial port to output the value every 50ms to the Serial Monitor....

Using L293D IC for motors

Physical Computing Tutorials

...nst int motorPin2 = 6; // Pin 10 of L293 //Motor B const int mot ...d = 11; const int motorPin3 = 10; // Pin 7 of L293 const int mo ...igitalWrite(motorPin3, HIGH); //10 digitalWrite(motorPin4, LOW); delay(2000); //This code will turn ...

How to connect a push button or switch

Physical Computing Tutorials

...rduino pin through a high value 10KΩ resistor to ground, this allo ...ng up and down over a period of 10µS (0.00001 seconds) In effect this means that each time you press the button to toggle just once it toggles multiple times, you can fix this either wit...

DFRobot Sensor Testing: HX711 Weight Sensor, Voice Recorder Module Pro, Speech Synthesis Module V2

Physical Computing Tutorials

...I2C communication. It can store 10 segments of 100s audio. It also has a simplified speech synthesis function, for numbers 0 to 9 only. The built-in LED is very helpful when using the module. Off: No recording at the current number Yellow: There is a r...

How to Program an ATtiny85 with an Arduino Uno

Physical Computing Tutorials

... Pin 11 --> Pin 0 (5) Pin 10 --> Reset (1) Only when ...ploading code to ATtiny85 Put a 10uF capacitor between GND and RESET on Arduino Adding Attiny85 to Boards Manager We have to make ATtiny compatible with Arduino IDE first, so that we ca...

How to use a relay module

Physical Computing Tutorials

...alize digital pin as an output. pinMode(RELAY_PIN, OUTPUT); } // the loop function runs over and over again forever void loop() { digitalWrite(RELAY_PIN, HIGH); //turn on delay(1000); digitalWrite(RELAY_PIN, L ...OW); //turn off delay(1000); }

How to use a Flat Vibration Switch

Physical Computing Tutorials

... contact with the second pin. So when there's a bump, the two pins will act like a closed switch. When everything is still, the switch is open. Wiring one pin to GND & D2 via 10k resistor one pin to 5V Gett ...Write(ledPin, LOW); } delay(100); }

Using a HC-SR04 distance sensor

Physical Computing Tutorials

...urate for projects where needed, this is a cheap < £5 sensor, while more accurate ones are over £100. Wiring Wiring up the sensor i ...alWrite(13, HIGH); delay(100); }else{ digita ...lWrite(13, LOW); delay(100); } }

Using a Vibration Motor

Physical Computing Tutorials

... 3; //motor transistor is connected to pin 3 void setup() { pinMode(motorPin, OUTPUT); } void loop() { digitalWrite(motorPin, HIGH); //vibrate delay(1000); // delay one second digi ...LOW); //stop vibrating delay(1000); //wait 50 seconds. }

How to use a Hall Effect Sensor

Physical Computing Tutorials

...net or an electromagnet with its output varying in proportion to the strength of the magnetic field being detected. Wiring left to 5V (Power) middle to GND right to PIN2 via 10K resistor Getting started Th ...tln(hallSensorState); delay(100); }

Using a Membrane Potentiometer (SoftPot)

Physical Computing Tutorials

...ensor is simple, the sensor is unpolarized so it's doesn't matter which pin to 5V or GND. Pin1 (the one on the side of the thinner strip) to 5V Pin2 (middle pin) to A0 & via 10k resistor to GND Pin3 (the one ...ntln(softPotPosition); delay(100); }

Controlling an actuator with a N-channel Mosfet

Physical Computing Tutorials

...al device. #define actuatorPin 13 void setup() { pinMode( actuatorPin, OUTPUT ); } void loop() { digitalWrite( actuatorPin, HIGH ); delay( 1000 ); digitalWrite( ...ctuatorPin, LOW ); delay( 1000 ); }

Using an PN532 RFID reader

Physical Computing Tutorials

...22 Range ~10 cm ~5 cm ✔ PN522 ... Cost Higher (~$10–$30) Lower (~$2–$10) ✔ MFRC522 ... Serial.print("."); delay (1000); } Serial.println(); S ...S50 card/tag, block 1-2, 4-6, 8-10, 12-14... 56-58, 60-62 are for ...