انتقل إلى وضع عدم الاتصال باستخدام تطبيق Player FM !
المدونة الصوتية تستحق الاستماع
برعاية


1 Tiffany Yu — Smashing Stereotypes and Building a Disability-Inclusive World 30:23
Using the Same Input to Trigger Multiple Arduinos
Manage episode 269164111 series 2774299
If you ever have a project using two or more Arduinos, it's likely you'll want them to work together.
Say for example you have one Arduino connected to an LCD shield, and another Arduino controlling an LED matrix. You want both to do something when you press a single button - how can this be done?
It turns out to be extremely easy. This video will describe in detail how to trigger multiple Arduinos with a single input.
CODE:
/* Button Turns on and off a light emitting diode(LED) connected to digital pin 13, when pressing a pushbutton attached to pin 2. The circuit: * LED attached from pin 13 to ground * pushbutton attached to GND through pin 2 on two (or more) Arduino's * Note: on most Arduinos there is already an LED on the board attached to pin 13. created 2005 by DojoDave modified 30 Aug 2011 by Tom Igoe Modified 16 APR 2015 by Michael James https://programmingelectronics.com/using-the-same-input-to-trigger-multiple-arduinos/ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Button */ // constants won't change. They're used here to // set pin numbers: const int buttonPin = 2; // the number of the pushbutton pin const int ledPin = 13; // the number of the LED pin // variables will change: int buttonState = 0; // variable for reading the pushbutton status void setup() { // initialize the LED pin as an output: pinMode(ledPin, OUTPUT); // initialize the pushbutton pin as an input: pinMode(buttonPin, INPUT_PULLUP); } void loop() { // read the state of the pushbutton value: buttonState = digitalRead(buttonPin); // check if the pushbutton is pressed. // if it is, the buttonState is HIGH: if (buttonState == LOW) { // turn LED on: digitalWrite(ledPin, HIGH); } else { // turn LED off: digitalWrite(ledPin, LOW); } }Breadboard Layout:
Downloads:If you like this tutorial, check out some of out very best by signing up for our free Arduino Crash Course below.
61 حلقات
Manage episode 269164111 series 2774299
If you ever have a project using two or more Arduinos, it's likely you'll want them to work together.
Say for example you have one Arduino connected to an LCD shield, and another Arduino controlling an LED matrix. You want both to do something when you press a single button - how can this be done?
It turns out to be extremely easy. This video will describe in detail how to trigger multiple Arduinos with a single input.
CODE:
/* Button Turns on and off a light emitting diode(LED) connected to digital pin 13, when pressing a pushbutton attached to pin 2. The circuit: * LED attached from pin 13 to ground * pushbutton attached to GND through pin 2 on two (or more) Arduino's * Note: on most Arduinos there is already an LED on the board attached to pin 13. created 2005 by DojoDave modified 30 Aug 2011 by Tom Igoe Modified 16 APR 2015 by Michael James https://programmingelectronics.com/using-the-same-input-to-trigger-multiple-arduinos/ This example code is in the public domain. http://www.arduino.cc/en/Tutorial/Button */ // constants won't change. They're used here to // set pin numbers: const int buttonPin = 2; // the number of the pushbutton pin const int ledPin = 13; // the number of the LED pin // variables will change: int buttonState = 0; // variable for reading the pushbutton status void setup() { // initialize the LED pin as an output: pinMode(ledPin, OUTPUT); // initialize the pushbutton pin as an input: pinMode(buttonPin, INPUT_PULLUP); } void loop() { // read the state of the pushbutton value: buttonState = digitalRead(buttonPin); // check if the pushbutton is pressed. // if it is, the buttonState is HIGH: if (buttonState == LOW) { // turn LED on: digitalWrite(ledPin, HIGH); } else { // turn LED off: digitalWrite(ledPin, LOW); } }Breadboard Layout:
Downloads:If you like this tutorial, check out some of out very best by signing up for our free Arduino Crash Course below.
61 حلقات
Tất cả các tập
×
1 Arduino Course for Absolute Beginners 2nd Edition 3:20


1 How to change the font color in the Arduino IDE 4:55

1 Use Serial.print() to display Arduino output on your computer monitor: Part 2 6:25

1 Use Serial.print() to Display Arduino output on your computer monitor: Part 1 8:36

1 How to make a secret knock detector to trigger anything with only an Arduino and a few cheap components 12:57

1 Arduino Pseudo Random Non-Consecutive Number Generator 11:13


1 Understanding the Arduino Sketchbook: Opening and Saving Arduino Sketches 9:41

1 An Easy Way to Learn I2C, SPI, RTC, ADCs and More with this Awesome Arduino Education Shield 5:04

1 The Process and Tools I use for Creating Arduino Tutorials 8:10

1 Using the Same Input to Trigger Multiple Arduinos 9:41

1 6 Tips on Assembling an Arduino Shield (Or any Electronics Kit) 8:15

1 A YouTube Channel for Learning about Arduino 5:34



1 How to Use and Understand the Arduino Reference 12:48

1 Using Red-Green-Blue (RGB) LEDs with Arduino (Common Cathode Type) 14:47



1 How to Make One Button Have the Functionality of Two or More with Arduino 15:40

1 Understanding HIGH and LOW Arduino Pin States 12:31

1 Floating Pins, Pull-Up Resistors and Arduino 10:29

1 The MOST guaranteed way to NOT buy a Fake Arduino (The Story of Pizza-Duino) 5:48

1 Throw out your breadboard! Dr. Duino: An Arduino Shield for debugging and developing Arduino projects 11:35

1 Shorthand Arithmetic :: Using Compound Operators (+= , -= , *= , /= ) with Arduino 12:43

1 Understanding Boolean Data Types and Using the Boolean NOT (!) operator to Switch Arduino Pin States 8:11

1 What to do when you just don't know :: Arduino, ADXL345 triple axis accelerometer and an RGB LED 14:04

1 3 Ways to Use Acceleration in an Arduino Sketch 17:37

1 Check out our premium Arduino Training Course 2:16

1 Understanding the Arduino uber functions loop() and setup() 10:26

1 Functions: Let's make programming Arduino as easy as possible 11:00



1 Syntax; the spelling and grammar of programming 11:32


1 The Arduino Development Toolchain - How it all gets done... 8:40

1 Arduino Board Hardware overview for people like me 10:38

1 Everything you need to know about the Arduino IDE (for now) 11:09

1 Mac - Download and Install the Arduino IDE 7:16

1 PC - Download and Install the Arduino IDE 7:10

1 Arduino Integrated Development Environment Version 2:24







1 How to read voltages with analogRead() 14:44










1 What can you do with Arduino? Let's get pumped! 3:12


1 Arduino Lessons from Programming Electronics Academy 2:22
مرحبًا بك في مشغل أف ام!
يقوم برنامج مشغل أف أم بمسح الويب للحصول على بودكاست عالية الجودة لتستمتع بها الآن. إنه أفضل تطبيق بودكاست ويعمل على أجهزة اندرويد والأيفون والويب. قم بالتسجيل لمزامنة الاشتراكات عبر الأجهزة.