arduino里面的digital channel dc55potwrite(channel,level)的语法是什么含义,我看书里面有

小站会根据您的关注,为您发现更多,
看到喜欢的小站就马上关注吧!
下一站,你会遇见谁的梦想?
Arduino&is&an&open-source&electronics&prototyping&platform&based&on&flexible,&easy-to-use&hardware&and&software.&It's&intended&for&artists,&designers,&hobbyists,&and&anyone&interested&in&creating&interactive&objects&or&environments.&&Reference&Website:&arduino.cc(本小站以英文为主)
Arduino 密码声音门锁
此系统主要由压电传感器,高扭矩电机,还有Arduino Duemilanove微控制器组成。 可用于感应声音节奏,当声音节奏与Arduino内存里编辑好的节奏相吻合,Arduino微控制器便驱动高扭矩电机。 此系统可用于控制房门锁开关, 当敲门声节奏与Arduino微控制器内相同,电机扭转,打开房门。
Piezo Knock Sensor
// project 9& Piezo Knock sensor
Parts Required:
Connection Schematic:
Programming in Arduino://project 9 piezo knock sensorint ledPin = 9;&&&&&&&&&&&&&&&&&& LED on digital pin 9int piezoPin = 5;&&&&&&&&&&&&&& Piezo on Analog pin 5int threshold= 120;&&&&&&&&&& the sensor value to reach before activationint sensorValue = 0;&&&&&&&& a variable to store the value read from the sensorfloat ledValue = 0;&&&&&&&&&&& the brightness of the LED&void setup(){& pinMode(ledPin, OUTPUT);& digitalWrite(ledPin, HIGH);& delay(150);& digitalWrite(ledPin, LOW);& delay(150);}void loop(){& sensorValue = analogRead(piezoPin);& if ( sensorValue&=threshold)& {&&& ledValue = 255;& }& analogWrite(ledPin, int(ledValue)));& ledValue = ledValue - 0.05;& if (ledValue&0)& { ledValue = 0;}}&
MMA7361 3-axis accelerometer which can be used in detecting tilt angle
DC motor& stepper Control With Arduino Motor Shield ( 很简单实用 //PID controller,impedance controller,sliding mode controller, adaptive controller会在以后介绍)
//project 8 DCmotor & Stepper control with Arduino Motor Shield
//One DC Motor
void setup() {& & //Setup Channel A& pinMode(12, OUTPUT); //Initiates Motor Channel A pin& pinMode(9, OUTPUT); //Initiates Brake Channel A pin& }void loop(){& & //forward @ full speed& digitalWrite(12, HIGH); //Establishes forward direction of Channel A& digitalWrite(9, LOW);&& //Disengage the Brake for Channel A& analogWrite(3, 255);&& //Spins the motor on Channel A at full speed& & delay(3000);& & digitalWrite(9, HIGH); //Eengage the Brake for Channel A& delay(1000);& & //backward @ half speed& digitalWrite(12, LOW); //Establishes backward direction of Channel A& digitalWrite(9, LOW);&& //Disengage the Brake for Channel A& analogWrite(3, 123);&& //Spins the motor on Channel A at half speed& & delay(3000);& & digitalWrite(9, HIGH); //Eengage the Brake for Channel A& & delay(1000);& }&
//Two DC motors
void setup() {& & //Setup Channel A& pinMode(12, OUTPUT); //Initiates Motor Channel A pin& pinMode(9, OUTPUT); //Initiates Brake Channel A pin& //Setup Channel B& pinMode(13, OUTPUT); //Initiates Motor Channel A pin& pinMode(8, OUTPUT);& //Initiates Brake Channel A pin& }void loop(){& & //Motor A forward @ full speed& digitalWrite(12, HIGH); //Establishes forward direction of Channel A& digitalWrite(9, LOW);&& //Disengage the Brake for Channel A& analogWrite(3, 255);&& //Spins the motor on Channel A at full speed& //Motor B backward @ half speed& digitalWrite(13, LOW);& //Establishes backward direction of Channel B& digitalWrite(8, LOW);&& //Disengage the Brake for Channel B& analogWrite(11, 123);&&& //Spins the motor on Channel B at half speed& & delay(3000);& & digitalWrite(9, HIGH);& //Engage the Brake for Channel A& digitalWrite(9, HIGH);& //Engage the Brake for Channel B
& delay(1000);& & & //Motor A forward @ full speed& digitalWrite(12, LOW);& //Establishes backward direction of Channel A& digitalWrite(9, LOW);&& //Disengage the Brake for Channel A& analogWrite(3, 123);&&& //Spins the motor on Channel A at half speed& & //Motor B forward @ full speed& digitalWrite(13, HIGH); //Establishes forward direction of Channel B& digitalWrite(8, LOW);&& //Disengage the Brake for Channel B& analogWrite(11, 255);&& //Spins the motor on Channel B at full speed& & & delay(3000);& & & digitalWrite(9, HIGH);& //Engage the Brake for Channel A& digitalWrite(9, HIGH);& //Engage the Brake for Channel B& & & delay(1000);& }
int delaylegnth = 30;void setup() {& & //establish motor direction toggle pins& pinMode(12, OUTPUT); //CH A -- HIGH = forwards and LOW = backwards& pinMode(13, OUTPUT); //CH B -- HIGH = forwards and LOW = backwards&&& //establish motor brake pins& pinMode(9, OUTPUT); //brake (disable) CH A& pinMode(8, OUTPUT); //brake (disable) CH B
& & }void loop(){&& digitalWrite(9, LOW);& //ENABLE CH A& digitalWrite(8, HIGH); //DISABLE CH B& digitalWrite(12, HIGH);&& //Sets direction of CH A& analogWrite(3, 255);&& //Moves CH A& & delay(delaylegnth);& & digitalWrite(9, HIGH);& //DISABLE CH A& digitalWrite(8, LOW); //ENABLE CH B& digitalWrite(13, LOW);&& //Sets direction of CH B& analogWrite(11, 255);&& //Moves CH B& & delay(delaylegnth);& & digitalWrite(9, LOW);& //ENABLE CH A& digitalWrite(8, HIGH); //DISABLE CH B& digitalWrite(12, LOW);&& //Sets direction of CH A& analogWrite(3, 255);&& //Moves CH A& & delay(delaylegnth);&&& & digitalWrite(9, HIGH);& //DISABLE CH A& digitalWrite(8, LOW); //ENABLE CH B& digitalWrite(13, HIGH);&& //Sets direction of CH B& analogWrite(11, 255);&& //Moves CH B& & delay(delaylegnth);}&
// before any wiring, one needs to figure out pinout of stepper (or DC motor) if one doesn't know anything about those motors.
Light 'Em Up (点亮世界)
RGB (Red Green Blue) Lamp
Beautiful RGB Cube//Project 7 RGB Mood Lamp
Parts Required
Connection Schematic
(It' you just need to cover the lights with a paper lampshade or something like that and you are ganna have your RGB Mood lamp!)
Programming in Arduino// Project 7-RGB Mood Lampfloat RGB1[3];float RGB2[3];float INC[3];&int red,green,int RedPin = 11;int GreenPin = 10;int BluePin = 9;&void setup(){&randomSeed(analogRead(0));& creating random numbers&RGB1[0] = 0;& RGB1 is a three element array storing RGB values you want the lamp to&start with.&RGB1[1] = 0;&RGB1[2] = 0;&RGB2[0] = random(256);&&& RGB2 is the three element array storing a set of random RGB values that you want the lamp to transit to&RGB2[1] = random(256);&RGB2[2] = random(256);}void loop(){&randomSeed(analogRead(0));&for (int x=0;x&3;x++)&&&& This for loop sets the INCrement Values for the RGB channels by working out the difference between the two brightness values and dividing that by 256& {& INC[x] = (RGB1[x] - RGB2[x])/256;&&&&&}&for (int x=0;x&256;x++)& {&& red = int(RGB1[0]);&& green = int(RGB1[1]);&& blue = int(RGB1[2]);&& analogWrite (RedPin, red);&& analogWrite (GreenPin, green);&& analogWrite ( BluePin, blue);&& delay(100);&& RGB1[0] -=INC[0];& RGB1[1] -= INC[1];& RGB1[2] -=INC[2];& }& for (int x=0;x&3;x++)& {&& RGB2[x] = random(556)-300;&& RGB2[x] = constrain(RGB2[x], 0, 255);&& delay(1000);& }}&&
应用:Arduino网络服务器
Touch Screens (触屏)
Project 6- Touch Screen Keypad
Part required
Connection Schematic
Pinouts Diagram
Programming in Arduino// project 6- Touch Screen#include &LiquidCrystal.h&LiquidCrystal lcd(2,3,4,5,6,7);& create an lcd object and assign the pins#define Left 8&&&&//left (x1) to digital pin 8#define Bottom 9&& //Bottom (Y2) to digital pin9#define Right 10&& //Right (X2) to digital pin 10#define Top 11&& //Top (Y1) to digital pin 11#define topInput 0&& //Top (Y1) to analog pin 0#define rightInput 1&& // Right (X2) to analog pin 1int coordX = 0, coordY = 0;char buffer[16];void setup(){&lcd.begin(16,2);&& Set the display to 16 columns and 2 rows&lcd.clear();}void loop(){&if (touch())&{& if ((coordX&110 && coordX&300)&&(coordY&170 && coordY&360)) {lcd.print("3");}& if ((coordX&110 && coordX&300)&&(coordY&410 && coordY&610)) {lcd.print("2");}& if ((coordX&110 && coordX&300)&&(coordY&640 && coordY&860)) {lcd.print("1");}& if ((coordX&330 && coordX&470)&&(coordY&170 && coordY&360)) {lcd.print("6");}& if ((coordX&330 && coordX&470)&&(coordY&410 && coordY&610)) {lcd.print("5");}& if ((coordX&330 && coordX&470)&&(coordY&640 && coordY&860)) {lcd.print("4");}& if ((coordX&490 && coordX&710)&&(coordY&170 && coordY&360)) {lcd.print("9");}& if ((coordX&490 && coordX&710)&&(coordY&410 && coordY&610)) {lcd.print("8");}& if ((coordX&490 && coordX&710)&&(coordY&640 && coordY&860)) {lcd.print("7");}& if ((coordX&760 && coordX&940)&&(coordY&170 && coordY&360)) {scrollLCD();}& if ((coordX&760 && coordX&940)&&(coordY&410 && coordY&610)) {lcd.print("0");}& if ((coordX&760 && coordX&940)&&(coordY&640 && coordY&860)) {lcd.clear();}& delay(250);&}}//return TRUE if touched, and set coordinates to touchX and touchYboolean touch(){&boolean touch =&// get horizontal coordinates&pinMode(Left,OUTPUT);&digitalWrite(Left, LOW);& //set Left to GND&pinMode(Right,OUTPUT);& //set right to +5V&digitalWrite(Right, HIGH);&pinMode(Top,INPUT);& //set Top to high impedance&pinMode(Bottom,INPUT));& //set Bottom to high impedance&delay(3);&coordX = analogRead(topInput);&// get vertical coordinates&pinMode(Bottom,OUTPUT); //set Bottom to GND&digitalWrite(Bottom, LOW);&pinMode(Top, OUTPUT); // set Top to +5V&digitalWrite(Top, HIGH);&pinMode(Right, INPUT); // set Right to high impedance&pinMode(Left,INPUT); //set Left to high impedance&delay(3);&coordY = analogRead(rightInput);&if(coordX & 1000 && coordX & 0 && coordY & 1000 && coord & 0) {touch =}&}void scrollLCD(){&for ( int scrollNum=0; scrollNum&16; scrollNum++)& {& lcd.scrollDisplatLeft();& delay(100);}&lcd.clear();}&
Servo Motor Control (伺服电机控制)
Project 5- Dual Servo Control (双伺服串口控制)
Parts required
Connection Schematic
Programming in Arduino//project 5- dual servo control#include &Servo.h&char buffer[10];Servo servo1;Servo servo2;void setup(){servo1.attach(5);servo2.attach(6);Serial.begin(9600);Serial.flush();servo1.write(90);servo2.write(90);Serial.println("STARTING...");}void loop(){if(Serial.available() & 0)& check if data has been entered&{ int index=0;& delay(100);& int numChar = Serial.available();& find the string length& if (numChar &10)&& if string length is larger than 10, make the length be 10&&& {numChar = 10;&&& }& while (numChar--)&&& {buffer[index++] = Serial.read();& Fill the buffer with the string&&& }&&splitString(buffer);& run splitString function}}void splitString(char* data)& the spllitString function receives the buffer array, splits it into separate commands if more than one is entered, and calls the serServo routine with the parameter stripped from the command string received over the serial line{Serial.print("Data entered:");Serial.println(data);char*parameter = strtok ( data, ",");& string to token& while(parameter !=NULL)&&& { serServo(parameter);&&&&& parameter = strtok (NULL,",");&&& }&&& for(int x=0; x&9;x++)&&& { buffer[x]='\0';&&& }&&& Serial.flush();}void serServo(char* data){&if((dara[0] == 'l')||(data[0] == 'L'))&& {&& int firstVal = strtol(data+1,NULL,10);&& firstVal = constrain(firstVal,0,180);&& servo1.write(firstVal);&& Serial.print("Servo1 is set to:");&& Serial.println(firstVal);&& }&if((data[0] == 'R') || (data[0] == 'r')&& {&& int secondVal = strtol(data+1,NULL,10);&& secondVal = constrain(secondVal,0,180);&& servo2.write(secondVal);&& Serial.print("Servo2 is set to:");&& Serial.println(secondVal);&& }}&
Servo Motor Control (伺服电机控制)
Project 4 - Joystick Servo Control ( 这个是简单的2轴操纵杆控制伺服电机位置, 可以做出很多简单的2DOF的机械装置)
Parts Required
Connection Schematic
&Programming in Arduino// project 4 - servo motor control#include &Servo.h&& Servo Library loaded here 调用Servo特有的数据库Servo servo1;& create a servo objectServo servo2;& create a second objectint pot1, pot2;void setup(){servo1.attach(5);& attaches the servo on pin 5 to the servo1 objectservo2.attach(6); attaches the servo on pin 6 to the servo2 object&servo1.write(90);& set servo1 at home positionservo2.write(90);& set servo2 at home position}&void loop(){pot1=analogRead(3);& Read the X-Axispot2=analogRead(4);& Read the Y-Axispot1 = map(pot1, 0, 0);& the value here and below is mapped to be between 0 and 180 degreespot2 = map(pot2, 0, 0);servo1.write(pot1);& write those mapped values here and below to the servosservo2.write(pot2);delay(15);}&
Arduino Projects
Arduino- Wireless Animatronic Hand
Arduino- Laser Harp
Arduino- LED 8 by 8 cude
Arduino Lilypad- turn signal biking jacket
DC Motor Control (直流电机Arduino控制)
Project 3 - Simple Motor Control
Parts Required
Connection Schematic
Programming in Arduino//project 3- Simple Motor Controlint potPin = 0;& Setting Analog input port 0int transistorPin = 9;& PWM pin 9 connected to the base of the transistorint potValue=0;& value returned from the potentiometervoid setup(){pinMode(transistorPin, OUTPUT);}void loop(){potValue = analogRead(potPin)/4;& read the potentiometer and convert it to 0-255, since&reading from analog input 0 ranges from 0-1023.analogWrite(transistorPin, potValue);}&通过旋转调节potentiometer, DC Motor将以不同的速度旋转
Lighe 'Em Up ( 点亮世界)
Project 2 - S.O.S. Morse Code Signaler
Parts required
Connection Schematic
Programming in Arduino&// Project 2- Morse Code Signalerint LedPin = 10;void setup(){pinMode(LedPin, OUTPUT);}void loop(){// 3 dits for the first letter S in S.O.S.for ( int x=0; x&3;x++){digitalWrite (LedPin, HIGH);delay(150);digitalWrite(LedPin,LOW);delay(150);}delay(100);// 3 dahs for the letter O in S.O.S.for ( int x=0;x&3;x++){digitalWrite(LedPin, HIGH);delay(150);digitalWrite(LedPin,LOW);delay(150);}delay(100);// 3 dits for the last letter S in S.O.S.for (int x=0; x&3;x++){digitalWrite(LedPin,HIGH);delay(150);digitalWrite(LedPin, LOW);delay(150);}delay(5000);}
Lighe 'Em Up ( 点亮世界)
Project 1 ---LED Flasher
Parts Required
Connection Schematic
Programming in Arduino// Project 1 - LED Flasherint LedPin = 10;&& Setting up a variable of type int(eger) for the pin on the Arduino used for LEDvoid setup()&{pinMode(LedPin, OUTPUT);& Setting up Digital port 10 as output}void loop(){digitalWrite(LedPin, HIGH);& Setting pin to HIGH, you are sending 5V light on&delay(1000);digitalWrite(LedPin,LOW);& Setting pin to LOW, you are sending 0V light offdelay(1000);}&&To be honest, without Arduino Microcontroller, one can also achieve LED flasher easily. However, this project is just giving a glance at what is Ardu Arduino Microcontroller can do much more than this.
Arduino UNO board Specifications ( Arduino UNO 板参数及详解)
The Arduino Uno is a microcontroller board based on the ATmega328 (). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.&
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial converter.
Revision 2 of the Uno board has a resistor pulling the 8U2 HWB line to ground, making it easier to put into DFU mode.
Revision 3 of the board has the following new features:&
&&&&&& 1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage provided from the board. In future, shields will be compatible both with the board that use the AVR, which operate with 5V and with the Arduino Due that operate with 3.3V. The second one is a not connected pin, that is reserved for future purposes.&
&&&&&& Stronger RESET circuit.&
&&&&&& Atmega 16U2 replace the 8U2.&
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest in a series of USB Arduino boards, and the reference model for the Arduino platform&
Microcontroller
Operating Voltage
Input Voltage (recommended)
Input Voltage (limits)
Digital I/O Pins
14 (of which 6 provide PWM output)
Analog Input Pins
DC Current per I/O Pin
DC Current for 3.3V Pin
Flash Memory
32 KB (ATmega328) of which 0.5 KB used by bootloader
2 KB (ATmega328)
1 KB (ATmega328)
Clock Speed
The Arduino Uno can be powered via the USB connection or with an external power supply. The power source is selected automatically.&
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector. &
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.&
The power pins are as follows:&
&&&&&& VIN. The input voltage to the Arduino board when it's using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin. &
&&&&&& 5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.&
&&&&&& 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.&
&&&&&& GND. Ground pins. &
The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of SRAM and 1 KB of EEPROM (which can be read and written with the ).&
Input and Output&
Each of the 14 digital pins on the Uno can be used as an input or output, using , , and
functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have specialized functions:&
&&&&&& Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip. &
&&&&&& External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the
function for details.&
&&&&&& PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the
function. &
&&&&&& SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using the .&
&&&&&& LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.&
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and the () function. Additionally, some pins have specialized functionality:&
&&&&&& TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the .&
There are a couple of other pins on the board:&
&&&&&& AREF. Reference voltage for the analog inputs. Used with ().&
&&&&&& Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.&
See also the . The mapping for the Atmega8, 168, and 328 is identical.&
Communication&
The Arduino Uno has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board channels this serial communication over USB and appears as a virtual com port to software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no external driver is needed. However, . The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB-to-serial chip and USB connection to the computer (but not for serial communication on pins 0 and 1).&
allows for serial communication on any of the Uno's digital pins.&
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of the I2C see the
for details. For SPI communication, use the .&
Programming&
The Arduino Uno can be programmed with the Arduino software (). Select "Arduino Uno from the Tools & Board menu (according to the microcontroller on your board). For details, see the reference and .&
The ATmega328 on the Arduino Uno comes preburned with a
that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the original STK500 protocol (, ).&
You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) see
for details.&
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available . The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:&
&&&&&& On Rev1 boards: connecting the solder jumper on the back of the board (near the map of Italy) and then resetting the 8U2. &
&&&&&& On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground, making it easier to put into DFU mode.&
You can then use
(Windows) or the
(Mac OS X and Linux) to load a new firmware. Or you can use the ISP header with an external programmer (overwriting the DFU bootloader). See
for more information.&
Automatic (Software) Reset&
Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is designed in a way that allows it to be reset by software running on a connected computer. One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the Arduino environment. This means that the bootloader can have a shorter timeout, as the lowering of DTR can be well-coordinated with the start of the upload. &
This setup has other implications. When the Uno is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the bootloader is running on the Uno. While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the board receives one-time configuration or other data when it first starts, make sure that the software with which it communicates waits a second after opening the connection and before sending this data.&
The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset by connecting a 110 ohm resistor from 5V see
for details.&
USB Overcurrent Protection&
The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from shorts and overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection until the short or overload is removed. &
Physical Characteristics&
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the USB connector and power jack extending beyond the former dimension. Four screw holes allow the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.&
Introduction
What is Arduino?Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. It's an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board.&Arduino can be used to develop interactive objects, taking inputs from a variety of switches or sensors, and controlling a variety of lights, motors, and other physical outputs. Arduino projects can be stand-alone, or they can be communicate with software running on your computer (e.g. Flash, Processing, MaxMSP.) The boards can be assembled by hand or pu the open-source IDE can be downloaded for free.&The Arduino programming language is an implementation of Wiring, a similar physical computing platform, which is based on the Processing multimedia programming environment.&Why Arduino?There are many other microcontrollers and microcontroller platforms available for physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard, and many others offer similar functionality. All of these tools take the messy details of microcontroller programming and wrap it up in an easy-to-use package. Arduino also simplifies the process of working with microcontrollers, but it offers some advantage for teachers, students, and interested amateurs over other systems:&
Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller platforms. The least expensive version of the Arduino module can be assembled by hand, and even the pre-assembled Arduino modules cost less than $50&
Cross-platform - The Arduino software runs on Windows, Macintosh OSX, and Linux operating systems. Most microcontroller systems are limited to Windows.&
Simple, clear programming environment - The Arduino programming environment is easy-to-use for beginners, yet flexible enough for advanced users to take advantage of as well. For teachers, it's conveniently based on the Processing programming environment, so students learning to program in that environment will be familiar with the look and feel of Arduino&
Open source and extensible software- The Arduino software is published as open source tools, available for extension by experienced programmers. The language can be expanded through C++ libraries, and people wanting to understand the technical details can make the leap from Arduino to the AVR C programming language on which it's based. SImilarly, you can add AVR-C code directly into your Arduino programs if you want to.&
Open source and extensible hardware - The Arduino is based on Atmel's ATMEGA8 and ATMEGA168 microcontrollers. The plans for the modules are published under a Creative Commons license, so experienced circuit designers can make their own version of the module, extending it and improving it. Even relatively inexperienced users can build the breadboard version of the module in order to understand how it works and save money.
Getting Started with Arduino WORLD!
Introduction: What Arduino is and why you'd want to use it.
Installation: Step-by-step instructions for setting up the Arduino software and connecting it to an Arduino Uno, Mega2560, Duemilanove, Mega, or Diecimila.&Windows Mac OS X Linux (on the playground wiki)
Environment: Description of the Arduino development environment and how to change the default language.&Libraries: Using and installing Arduino libraries.
Troubleshooting: Advice on what to do if things don't work.
Arduino Product Board
Arduino R3 UNO
Arduino R3 UNO rear view
Arduino LilyPad
Mega ADK board
Arduino Ethernet
Arduino Mega 2560 board
Arduino Nano
Arduino Pro Mini
Arduino Mini
大家好,欢迎来到我的小站!
站长在关注

我要回帖

更多关于 digital channel合集 的文章

 

随机推荐