Arduino Shield Manual Version 1.4 www.DFRobot.com Copyright©2010 by DFRobot.
Arduino Shields Manual 2010 Table of Contents Arduino I/O Expansion Shield ................................................................................................................ 4 Introduction ........................................................................................................................................ 4 Diagram ............................................................................................................................................... 4 Sample Code ...
Arduino Shields Manual 2010 Stackable Table ..................................................................................................................................... 17 Control Pin Table...................................................................................................................................
Arduino Shields Manual 2010 Arduino I/O Expansion Shield (SKU: DFR0014) Introduction The Arduino I/O Expansion Shield provides an easy way to connect sensors, servos and RS485 device to Arduino board. It expands Arduino’s Digital I/O and Analog Input Pins with Power and GND. It also provides separate PWM Pins which are compatible with standard servo connector. Another unique feature is that the I/O shield has a build-in RS485 converter which allows Arduino communicating with RS485 devices.
Arduino Shields Manual 2010 Arduino Motor Shield (SKU: DRI0001) Introduction This motor shield allows Arduino to drive two channel DC motors. It uses a L293B chip which deliveries output current up to 1A each channel. The speed control is achieved through conventional PWM which can be obtained from Arduino’s PWM output Pin 5 and 6. The enable/disable function of the motor control is signalled by Arduino Digital Pin 4 and 7. Roboduino Motor Shield uses PWM output Pin 6 and 9 and Digital Pin 7 and 8.
Arduino Shields Manual 2010 Sample Code //This motor shield use Pin 6,5,7,4 to control the motor // Simply connect your motors to M1+,M1-,M2+,M2// Upload the code to Arduino/Roboduino // Through serial monitor, type 'a','s', 'w','d','x' to control the motor // www.dfrobot.
Arduino Shields Manual 2010 Serial.begin(9600); } void loop() { int x,delay_en; char val; while(1) { val = Serial.
Arduino Shields Manual 2010 Arduino LCD&KeyPad Shield (SKU: DFR0009) Introduction The LCD Keypad shield is developed for Arduino compatible boards, to provide a user-friendly interface that allows users to go through the menu, make selections etc. It consists of a 1602 white character blue backlight LCD. The keypad consists of 5 keys — select, up, right, down and left. To save the digital IO pins, the keypad interface uses only one ADC channel. The key value is read through a 5 stage voltage divider.
Arduino Shields Manual 2010 Figure 4 Pin Out Diagram Pin Allocation Pin Function Analog 0 Button (select, up, right, down and left) Digital 4 DB4 Digital 5 DB5 Digital 6 DB6 Digital 7 DB7 Digital 8 RS (Data or Signal Display Selection) Digital 9 Enable Digital 10 Backlit Control -9-
Arduino Shields Manual 2010 Sample Code //example use of LCD4Bit_mod library #include //create object to control an LCD.
Arduino Shields Manual 2010 } void loop() { adc_key_in = analogRead(0); // read the value from the sensor digitalWrite(13, HIGH); key = get_key(adc_key_in); // convert into key press if (key != oldkey) // if keypress is detected { delay(50); // wait for debounce time adc_key_in = analogRead(0); // read the value from the sensor key = get_key(adc_key_in); // convert into key press if (key != oldkey) { oldkey = key; if (key >=0){ lcd.cursorTo(2, 0); //line=2, x=0 lcd.
Arduino Shields Manual 2010 if (input < adc_key_val[k]) { return k; } } if (k >= NUM_KEYS) k = -1; // No valid key pressed return k; } - 12 -
Arduino Shields Manual 2010 Arduino Input Shield (SKU: DRR0008) Introduction The Arduino Input Shield includes a two axis mini joystick (with moment switch) as well as two colored push buttons. The reserved APC220 module interface is to facilitate the realization of wireless rocker button controller. The shield can be easily stacked on top of your Arduino.
Arduino Shields Manual 2010 Sample Code //This input shield use Digital Pin 3,4,5 (3 buttons) and Analog Pin 0,1 (JS) // // Upload the code to Arduino // www.dfrobot.
Arduino Shields Manual 2010 val=analogRead(y); if(val>1000||val<20) digitalWrite(LED, HIGH); else digitalWrite(LED,LOW); if(digitalRead(button_A)==0) //Check Button A { digitalWrite(LED, HIGH); // Set LED on } else digitalWrite(LED,LOW); if(digitalRead(button_B)==0) //Check Button B { digitalWrite(LED, HIGH); // Set LED Off } else digitalWrite(LED,LOW); if(digitalRead(button_C)==0) //Check Button C { digitalWrite(LED, HIGH); } else digitalWrite(LED,LOW); } } - 15 - // Set LED off
Arduino Shields Manual 2010 Arduino Nano IO Shield (SKU: DRR0012) Introduction The Nano IO Shield extends the Digital I/O with Power and GND Pins. A communication module socket provides an easy way to integrate APC220 RF module and DF-Bluetooth module which brings a wireless solution.
Arduino Shields Manual 2010 Compatible Table Diecimila Duemilanove Mega Nano Romeo IO Shield Yes Yes Yes No No Motor Shield Yes Yes Yes No No Ethernet Shield No Yes No No Yes LCD&Keypad Shield Yes Yes Yes No No Input Shield Yes Yes Yes No Yes XBee Shield Yes Yes Yes No Yes Nano IO Shield No No No Yes No Stackable Table Shield Name Stackable IO Shield Yes Motor Shield Yes Ethernet Shield Yes LCD&Keypad Shield No Input Shield No XBee Shield No Nan
Arduino Shields Manual 2010 Control Pin Table Shield Name Control Pin IO Shield None Motor Shield 6,7,8(5),9(4) Ethernet Shield 10,11,12,13 Digital Pin: 4,5,6,7,8,9,10 Analog Pin: 0 Digital Pin:3,4,5 Analog Pin: 0,1 LCD&Keypad Shield Input Shield XBee Shield 0,1 Nano IO Shield None Where to buy ? Region Shop USA/Canada http://www.robotshop.ca UK http://www.yerobot.com China http://www.dfrobot.com Taiwan http://www.aroboto.com/ Thailand http://www.micro4you.
Arduino Shields Manual 2010 Revision Date Comments 1.0 20 August 2009 First Release 1.1 2nd September 2009 Add LCD pin out Diagram 1.2 14th November 2009 Modify Motor shield Pin allocation 1.3 24th December 2009 Modify Motor shield code 1.