Arduino open source characteristics, making her support of a large number of fans on the Internet, there have been a lot of learning communities. As A

Similar documents
Your Multimeter. The Arduino Uno 10/1/2012. Using Your Arduino, Breadboard and Multimeter. EAS 199A Fall Work in teams of two!

INTRODUCTION TO SERIAL ARM

Basic Pulse Width Modulation

Microcontroller Programming Beginning with Arduino. Charlie Mooney

Arduino Lesson 14. Servo Motors

Work with Arduino Hardware

Arduino Lab 1 - The Voltage Divider

Lab 6 Introduction to Serial and Wireless Communication

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

Theory and Practice of Tangible User Interfaces. Thursday Week 2: Digital Input and Output. week. Digital Input and Output. RGB LEDs fade with PWM

Six-servo Robot Arm. DAGU Hi-Tech Electronic Co., LTD Six-servo Robot Arm

Ultrasonic Distance Measurement Module

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

IR Communication a learn.sparkfun.com tutorial

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

Lab 3 - DC Circuits and Ohm s Law

Lab Experiment 1: The LPC 2148 Education Board

Servo Motors (SensorDAQ only) Evaluation copy. Vernier Digital Control Unit (DCU) LabQuest or LabPro power supply

Surveillance System Using Wireless Sensor Networks

MANUAL FOR RX700 LR and NR

Advanced Data Capture and Control Systems

STEPPER MOTOR SPEED AND POSITION CONTROL

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation

FREQUENCY RESPONSE OF AN AUDIO AMPLIFIER

SYSTEM 4C. C R H Electronics Design

Multi-Touch Ring Encoder Software Development Kit User s Guide

CHAPTER 11: Flip Flops

Arduino Lesson 13. DC Motors. Created by Simon Monk

Introduction to Arduino

C4DI Arduino tutorial 4 Things beginning with the letter i

If an occupancy of room is zero, i.e. room is empty then light source will be switched off automatically

Measuring Resistance Using Digital I/O

Instruction Manual Service Program ULTRA-PROG-IR

Arduino Lesson 16. Stepper Motors

Introduction to Arduino

1602 LCD adopts standard 14 pins(no backlight) or 16pins(with backlight) interface, Instruction of each pin interface is as follows:

Arduino Lesson 0. Getting Started

Business/Home GSM Alarm System. Installation and User Manual

DEPARTMENT OF ELECTRONICS ENGINEERING

SYSTEM 45. C R H Electronics Design

An Introduction to MPLAB Integrated Development Environment

GENERAL SCIENCE LABORATORY 1110L Lab Experiment 6: Ohm s Law

Microcontroller-based experiments for a control systems course in electrical engineering technology

Technical data. General specifications. Indicators/operating means. 30 Hz Multiplex operation 30 Hz / n, n = number of sensors, n 5

User Manual. AS-Interface Programmer

Using the Motor Controller

Technical data. General specifications. Indicators/operating means. Electrical specifications Operating voltage U B Power consumption P 0 Interface

Talon and Talon SR User Manual

Constructing a precision SWR meter and antenna analyzer. Mike Brink HNF, Design Technologist.

TX GSM SMS Auto-dial Alarm System. Installation and User Manual

Example Connection between USB Host and Android

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

Board also Supports MicroBridge

RPLIDAR. Low Cost 360 degree 2D Laser Scanner (LIDAR) System Development Kit User Manual Rev.1

ECE 495 Project 3: Shocker Actuator Subsystem and Website Design. Group 1: One Awesome Engineering

Servo Info and Centering

EVAL-UFDC-1/UFDC-1M-16

Cornerstone Electronics Technology and Robotics I Week 15 Voltage Comparators Tutorial

STIM202 Evaluation Kit

Arduino Wifi shield And reciever. 5V adapter. Connecting wifi module on shield: Make sure the wifi unit is connected the following way on the shield:

LAB 7 MOSFET CHARACTERISTICS AND APPLICATIONS

Electronics 5: Arduino, PWM, Mosfetts and Motors

Pulse width modulation

cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller

Arduino project. Arduino board. Serial transmission

Software Manual RS232 Laser Merge Module. Document # SU Rev A

Adding Heart to Your Technology

Transmitter Interface Program

AirCasting Particle Monitor Bill of Materials

TCP/IP MODULE CA-ETHR-A INSTALLATION MANUAL

How To Control Gimbal

Flight Controller. Mini Fun Fly

Arduino Lesson 4. Eight LEDs and a Shift Register

Controlling a Dot Matrix LED Display with a Microcontroller

Radio sensor powered by a mini solar cell the EnOcean STM 110 now functions with even less light

Firmware version: 1.10 Issue: 7 AUTODIALER GD30.2. Instruction Manual

Modern Robotics, Inc Core Device Discovery Utility. Modern Robotics Inc, 2015

TV Remote Controller Decoder

PRT3 Printer Module: ASCII Protocol Programming Instructions

Basic DC Motor Circuits. Living with the Lab Gerald Recktenwald Portland State University

Experiment 8 : Pulse Width Modulation

Basic DC Motor Circuits

1 de 13. Kit de 37 sensores compatibles con Arduino

IR-PRO IR-PRO. Operation Guide. Professional Infrared Code Capture System

Business/Home GSM. Alarm System(III) Installation and Users guide

Arduino Shield Manual

Green House Monitoring and Controlling Using Android Mobile Application

Compressor Supreme Force Feedback User Manual

FTDI VCP DRIVER (free) (WIN/MAC/LINUX)

1 Coffee cooling : Part B : automated data acquisition

QUICK START GUIDE FOR DEMONSTRATION CIRCUIT BIT DIFFERENTIAL ADC WITH I2C LTC2485 DESCRIPTION

Arduino Lesson 1. Blink

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

DMX2PWM 9 Channel Dimmer Setup Manual

VOICE RECOGNITION KIT USING HM2007. Speech Recognition System. Features. Specification. Applications

Microcontroller to Sensor Interfacing Techniques

The $25 Son of a cheap timer This is not suitable for a beginner. You must have soldering skills in order to build this kit.

DC Electronic Loads 8500 series

Lab 1: Introduction to PSpice

Transcription:

ArduBlock graphical programming kit --- For Arduino n Su u o F r e d n ArduBlock zero base programming package recently launched a Arduino-based graphical programming enthusiasts learning packages, greatly reduces the learning curve for enthusiasts, all programming are available through the building-block approach to high-level computer language and professional grammar, simplified as a module, piled together. Finally, and interactive Arduino Development Boards to make exciting effect. Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&field-brandtextbin=&node=172282

Arduino open source characteristics, making her support of a large number of fans on the Internet, there have been a lot of learning communities. As ArduBlock are the building blocks of programming, largely reducing the threshold of learners do not need specialized knowledge, no engineering background, as long as you like, you can play. Especially now that the great emphasis on training the next generation of people, this is for you and your child one of the best ways to parent-child interaction. ArduBlock zero base programming package list: 1. UNO R3 development board * 1 2 sensor expansion board * 1 3 white LED module * 1 4 red LED module * 1 5 Yellow LED module * 1 6 Green LED module * 1 7 buzzer module * 1 8 LM35 temperature sensor * 1 9 light sensor * 1 10 Sound Sensor * 1 11 rotary potentiometer module * 1 12 button module * 1 13 Ultrasonic Ranging Module * 1 14 XY joystick module * 1 15 9 g servos * 1 16 3PIN sensor cable * 5 17 DuPont lines * 20 18 USB cable * 1 Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

1.Arduino icrocontroller Introduction Arduino is derived from the Italian open source hardware projects a platform that includes a with a simple I / O functions of the circuit board and a set of application development environment software. Arduino can be used to develop interactive products, such as it can be read by a large number of switches and sensor signals, and can control lights, motors, and other kinds of physical devices; Arduino can also develop peripheral devices connected to the PC, can on the PC running the software to communicate. Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Arduino-driven installation and programming process: The experiment with the development board is UNO R3 development board, fully compatible with the official version. See physical map: Let's download the Arduino development software, web address: http://arduino.cc/en/main/software Downloaded arduino-1.0.zip file is a compressed folder, extract it to your hard drive. The UNO R3 development board via a USB cable to connect to Windows, you will be prompted with named "Arduino UNO R3" New USB device found Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Then Windows will guide us into the "Found New Hardware Wizard" window, select one of the "No, not this time" and click "Next" button: The next step you need to install the required drivers UNO R3, select one of the "Install from a list or specific location (Advanced)" option and click "Next" button: UNO R3 drivers on Arduino 1.0 drivers directory under the installation directory, we need to specify the directory where you installed Windows when driven search directories: Click the "Next" button, Windows will begin to find and install the Arduino drivers: If everything is normal, then we will see the following success screen: Arduino driver installation is successful, we can in the Windows Device Manager, find the corresponding Arduino serial port: ************************************************** **************************** Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

2.ArduBlock Introduction Designed for the Arduino a graphical programming software, created by the Shanghai New customer development workshop. ArduBlock official Arduino programming environment software is third-party software, must be attached to the Arduino software currently running, the text distinguishes Arduino programming environment, ArduBlock is the way to build a graphical programming blocks, in such a way makes visualization and programming Interactivity enhanced programming threshold is reduced, even without programming experience can also try to Arduino controller programming. Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

On the right is the image programming, left is to generate the C language, if you do not know C language, graphics, you should know it! The figure is a flashing led program The following analysis of the program Main do -> loop set a pin high -> Delay 1 second -> Set an output pin low -> Delay 1 second. If you are a master, please avoid: Graph corresponding C language void setup () pinmode (1, OUTPUT); void loop () digitalwrite (1, HIGH); delay (1000); digitalwrite (1, LOW); delay (1000); ************************************************** ***************************** Interest to the bar and immediately installed. Download: http://cloud.github.com/downloads/taweili/ardublock/ardublock-all.jar First download, open Arduino1.0, click File, then click Perferences (Figure) Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

We can see the pop-up box, remember the following this path (Figure) D: \ My Documents \ Arduino \ tools \ ArduBlockTool \ tool Look into your folder there is no such path, if no folder has been created, and then put back archive you downloaded (in fact, JAVA software) replication in the final folder inside the Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

installation is complete. Open the Arduino 1.0 development environment, Tools-> ArduBlock This option is (not the original) ************************************************** ************************* That ArduBlock exactly how to use it? ArduBlock modules are divided into different categories. "Control" zone is a function of control structures. (1) Control Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

2.PIN feet These modules can be in your Arduino template as a virtual pin. 3 numbers, constants and variables Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

4 op This project includes logical and mathematical operations 5 Common Commands Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

These are commonly used in programming. 6 modules Each module represents a direct use of hardware, it can be directly used as part of your hardware. ************************************************** ***************************** 3 experimental courses Here we should Arduino and ArduBlock have a preliminary understanding, we are following through hands-on learning of this graphical programming software. Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Ardublock zero-based programming routines 1 LED flashes experiments LED lights are more basic experimental one experiment, we used bright LED light modules to complete the experiment. Apparatus as follows: Arduino compatible development board uno R3 * 1 Arduino IO port expansion board V5 * 1 Bright LED light module * 1 3PIN sensor cable * 1 Small light experiment schematics Physical map Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Good link circuit according to the diagram, you can start writing programs, and we still make LED lights flashing, lit one second off one second. This procedure is very simple and comes with Arduino Blink similar routines where just 13 digital interface for doing 10 digital interface. A good job, then click download to ARDUINO, ARDUINO programming interface code will appear ************************************************** *************************** void setup () pinmode (10, OUTPUT); void loop () digitalwrite (10,! (HIGH)); delay (1000); digitalwrite (10,! (LOW)); delay (1000); Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Then we can see that we have received IO port 10 feet flashing bright LED lamp module, so our little lights flashing experiment is complete. ************************************************** ***************************** Note: Arduino development software choice TOOLS bar board option is UNO, To select the initial installation of the communications port serial appears Two indispensable, or can not download the program. ************************************************** ***************************** Ardublock zero-based programming routines 2 PWM Dimming PWM (Pulse-width modulation) pulse width modulation PWM is controlled using digital means to a means of the analog output. Using digital control generates different duty cycle square wave (a constant switching between on and off signals) to control the analog outputs. Generally port input voltage is only two 0V and 5V. If I want my output voltage of 3V how to do... Some students said that the series resistance, right, this method is correct drops. But if I want to 1V, 3V, 3.5V, and so forth between changes in how to do it? Impossible to keep it switched resistor. In this case... You need to use a PWM. How he controls it, the digital port for arduino LOW and HIGH voltage output only two switches, the corresponding voltage is 0V and 5V output, we present the LOW is defined as 0, HIGH is defined as 1 to a second arduino 500 outputs a signal of 0 or 1. If this is all for a 500, it is a complete 5V, if all is 0, that is 0V. If 010101010101 so that the output, just half and half, the output port on the feeling is the voltage output of 2.5V. This is a screening of the film, and we reason, we have to see the movie is not completely continuous, it is actually output 25 pictures per second, in this case is the servant can not be seen to the naked eye, it looks like that is a continuous. PWM is the same reason, if you want different voltages between 0 and 1 on the control of the output of proportional control is ok ~ course... This is true there are still differences of continuous output, output per unit time of 0,1 signal, the more control the more accurate. Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

In the following figure, the green line represents a cycle between, and its value is the reciprocal of the PWM frequency. In other words, if the arduino PWM frequency is 500Hz, then the period between two green lines is two milliseconds. analogwrite () command can be controlled in the range of 0-255, analogwrite (255) indicates a 100% duty cycle (normally open), analogwrite (127) duty cycle of about 50% (half the time). The experiment is controlled via a PWM LED lights brighten and then slowly let it slowly darken, so the cycle. Similarly, we still put bright LED module to the digital IO port pin 10, the following is a wiring diagram: Let Programming: Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Similarly, we still click (download to ARDUINO), see the code generated by IDE interface ************************************************** ********************** int _ABVAR_1_brightness; void setup () _ABVAR_1_brightness = 0; void loop () while (((_ABVAR_1_brightness) <(255))) _ABVAR_1_brightness = (_ABVAR_1_brightness + 1); analogwrite (10, 255 - (_ABVAR_1_brightness)); delay (5); while (((_ABVAR_1_brightness)> (0))) _ABVAR_1_brightness = (_ABVAR_1_brightness - 1); analogwrite (10, 255 - (_ABVAR_1_brightness)); delay (8); delay (200); ************************************************** ***************************** So the way we use the graphical programming the LED slowly fades as breathing, so we gave it a magical name, breathing light. Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Ardublock zero-based programming routines 3 traffic lights design experiments Above we have completed a single small light control experiment, then we do a little more complicated traffic light experiments, in fact, clever friends can see out of this experiment is to test a single small light above experiments extended to three colors The small lights, you can achieve our experiment simulated traffic lights. We accomplish this experiment required components in addition to Arduino compatible controller and the download cable is also required hardware is as follows: Red LED module * 1 Yellow LED module * 1 Green LED module * 1 3PIN cable * 3 Ready we can start these components, we can follow the above experimental replicability of small lights flashing, here is that we provide reference schematics, respectively, we use digital 10,7,4, interface. Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Since it is a traffic light simulation experiments, a small red-yellow-green lights flashing time will simulate real traffic lights, We use the Arduino delay () function to control the delay time relative to the C language would simply many of the. Let Programming: Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Click (download to ARDUINO), we can see that the IDE appears the following code: / / ************************************************ ***************************** void setup () pinmode (10, OUTPUT); pinmode (4, OUTPUT); pinmode (7, OUTPUT); void loop () digitalwrite (4, LOW); digitalwrite (7, LOW); digitalwrite (10, HIGH); delay (1000); digitalwrite (4, LOW); digitalwrite (7, HIGH); digitalwrite (10, LOW); delay (200); digitalwrite (4, HIGH); digitalwrite (7, LOW); digitalwrite (10, LOW); delay (1000); / / ************************************************ ****************************** Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

************************************************** ***************************** Complete the download process can be seen after the traffic control of our own design Ardublock zero-based programming routines 4 keys to control LED Control buttons are a commonly used electrical components, used to turn on or off the circuit, so as to control operation of the motor or other device switch. The experimental use buttons to control the led light or off. The general situation is directly to the key switch in series with the circuit led to the switch, this application is relatively simple. The experiment is controlled by indirect methods, determine the key after key is turned in the circuit output voltage, if the voltage is greater than 4.88V, the LED on the circuit output is high, and vice versa on the output low. Use logic to determine methods to control the LED light or off, this control method wide range of applications. Components needed to complete this experiment in addition Arduino compatible controller and download cable is also required hardware is as follows: White LED module * 1 Key module * 1 3PIN Cable * 2 Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Experimental diagram: Let Programming: Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Click (download to ARDUINO), we can see that the IDE appears the following code: / / ************************************************ ***************************** void setup () pinmode (10, OUTPUT); pinmode (4, INPUT); void loop () if ((digitalread (4) && HIGH)) digitalwrite (10,! (HIGH)); delay (50); else digitalwrite (10,! (LOW)); delay (50); ************************************************** ***************************** ************************************************** ***************************** After the completion of the download process can use the keypad to control LED lights up. Ardublock zero-based programming routines 5 buzzer Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

experiments Arduino can be done with a lot of interactive work, the most common and most commonly used is the sound and light show in front has been in use LED lights in the experiment, the experiment let everyone circuit sound, with a voice The most common is the buzzer and speaker components, the comparison of the two buzzer easier and ease the present study, we buzzer. The following components are to be prepared: Buzzer module * 1 3PIN Cable * 1 Connection diagram: Connect the circuit to the attention of the positive and negative point is that the buzzer of the points, can be seen below on the right physical map buzzer red and black two wiring. Connect the circuit program in this regard is very simple, with small lights front control buttons experimental procedure is similar because of the buzzer output control interface Digital interface also can control the high and low buzzer sounds. Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Let Programming: Click (download to ARDUINO), we can see that the IDE appears the following code: ***************************** Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

************************************************** **************************** After downloading the program, the buzzer experiments are done. Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Ardublock zero-based programming routines 6 experimental analog value read In this study, we have to start learning about analog I / O interface to use Arduino with Analog 0 - Analog 5 Total 6 analog interfaces, which six interface can also be counted as multiplexed interface functions, in addition to analog interface functions, which 6 can be used as a digital interface to use interfaces, numbered numeral 14 - the number 19, simple understanding after following on to start our experiment. Potentiometer is more familiar typical analog value output element, the experiment will be done with it. Required components are: Potentiometer module * 1 3PIN Cable * 1 In this study, we will be the resistance of the potentiometer into analog value is read out, and then displayed on the screen, which is why we need to complete their subsequent experimental features examples of applications that must be mastered. We need the following diagram to connect the physical map Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

We are using an analog 0 interface. Procedures for the preparation is very simple, a analogread (); statement can be read out analog port values, Arduino 328 is a 10-bit A / D acquisition, so the read analog value range is 0-1023, the experimental procedure There is also a difficulty value is displayed on the screen this problem, it is very simple to learn. First, we want to voidsetup () which set the baud rate, the indicated value is Arduino communicate with the PC, so the Arduino software and PC baud rate should be set in the same order to show the correct value, otherwise it will be garbled or does not appear in the lower right corner of the monitor window of Arduino software has a button that you can set the baud rate, the baud rate set here need to talk program void setup () which set the baud rate the same procedure to set the baud rate of the statement is Serial.begin (); including No value for the baud rate. The second is a statement of the displayed value, Serial.print (); or Serial.println (); all OK, unlike the latter value End show automatically after carriage return, the former is not, to explain more about the statement in front of Introduced here is not to say more, we have to write the program: Click (download to ARDUINO), we can see that the IDE appears the following code: / / ************************************************ ***************************** void setup () Serial.begin (9600); Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

void loop () Serial.print ("value:"); Serial.print (analogread (A0)); Serial.println (""); delay (1000); ************************************************** ********* Here is read analog values. This experiment is done here, when you turn the potentiometer knob when you can see the changes in the value on the screen, read the analog value of this method will always accompany us, the analog value is read very frequently used functions, as Many sensors are analog value output, we read the analog value, and then the corresponding algorithm processing, can be applied to the functions we need to implement in the. Ardublock zero-based programming routines 7 experimental sound and light control Photoresistor (photovaristor) also known as light-sensitive resistor which is made of the use of the photovoltaic effect of a resistance value changes with the intensity of incident light resistor; incident light intensity, the resistance decreases, the incident light is weak, the resistor increases. Light sensitive resistor is generally used for measurement, control and photoelectric conversion of light (the change of the light is converted to electrical change). Photoresistor can be widely used in various light control circuit, such as lighting control, regulation and other occasions, also be used for light control switch. In this experiment we first conduct a relatively simple experiment using photoresistors 1, the experimental device photoresistor modules: 1 Buzzer Module: 1 Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

3PIN Cable * 2 2, the experimental connection 3, the experimental principle The application process preceding sections read analog port voltage value method photoresistor connected directly to the digital port. When there is light, the photosensitive resistor decreases, the buzzer does not sound. Block photoresistor module, the normal sound, Let Programming: Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Click (download to ARDUINO), we can see that the IDE appears the following code: / / ************************************************ ***************************** int _ABVAR_1_val; void setup () _ABVAR_1_val = 0; Serial.begin (9600); pinmode (10, OUTPUT); void loop () _ABVAR_1_val = AnalogRead (A0); Serial.print ("light:"); Serial.print (_ABVAR_1_val); Serial.println (""); if (((_ABVAR_1_val) <= (50))) digitalwrite (10, HIGH); delay (1000); Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

else digitalwrite (10, LOW); delay (1000); ************************************************** Master the program, we can design experiments yourself, you can also use photoresistor control led lamp brightness. Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Ardublock zero-based programming routines 8 voice light experiment Sound sensor is used to ambient sound level in the detection, can be used to detect the intensity of the sound and the output voltage is proportional to. Analog sensors only need a dedicated data line, it can be used with Arduino sensor expansion board combination, very easy to achieve sound perception associated with interactive effects. Operating voltage: +3.3 / 5V, Interface Type: Analog, current: <10mA. After completion of the above, various experiments, we Arduino application should also have some knowledge and understanding, and in the basic digital inputs and outputs and analog inputs are controlled PWM generation later, we can begin to make some sensor applications the. The following are the required components: Sound Module * 1 Bright LED module * 1 Sensor cable * 2 Connect the circuit according to the following diagram. Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Connect can write programs, and Click (download to ARDUINO), we can see that the IDE appears the following code: / / ************************************************ ***************************** int _ABVAR_1_sound_value; int _ABVAR_2_; Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

void setup () _ABVAR_1_sound_value = 0; Serial.begin (9600); void loop () _ABVAR_1_sound_value = 0; for (_ABVAR_2_ = 0; _ABVAR_2_ <(100); + + _ABVAR_2_) _ABVAR_1_sound_value = (_ABVAR_1_sound_value + AnalogRead (A0)); analogwrite (11, 255 - (map (_ABVAR_1_sound_value, 0, 1024, 0, 255))); Serial.print ("sound val:"); Serial.print (_ABVAR_1_sound_value); Serial.println (""); ************************************************** **************************** After downloading the program we look at the value of serial monitoring Sound modules measured against the value of blowing, you can see there is a corresponding LED lights change. Sound modules in everyday life is a very broad application, usage is a lot, we can root According to this experiment, by analogy, to make better interactive work. Ardublock zero-based programming routines 9 servo control Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

experiments A position servo servo drive, mainly by the housing, a circuit board, coreless motors, gears and the position detector of the composition. Its working principle is the microcontroller sends a signal to the receiver or servos, which has an internal reference circuit, resulting in a period of 20ms, the width of 1.5ms reference signal will get the DC bias voltage and the potentiometer voltage comparator, access differential voltage output. Judgment of the IC via the circuit board the direction of rotation and then starts rotating non-core motor drive, the power transmitted through the reduction gear arm, and back to the signal from the position detector to determine whether the positioning has been reached. For changing the angle and that require a control system can be maintained. When the motor speed is constant, the reduction gear driven by cascading rotary potentiometer so that the voltage difference is 0, the motor stops rotating. General steering angle of rotation range is 0 to 180 degrees. There are many standard servos, but all the servos have an external three lines, respectively, with brown, red, orange and three colors to distinguish, because servos different brands, colors will vary, brown is the ground wire, red for positive power supply line, orange for the signal lines. Angle of rotation of the servo by adjusting the PWM (pulse width modulation) signal duty cycle to be achieved, standard PWM (pulse width modulation) signal period is fixed at 20ms (50Hz), in theory, should be distributed at 1ms pulse width to between 2ms, but, in fact, be 0.5ms to 2.5ms pulse width between pulse width and servo corner 0 ~ 180 correspond. It is worth noting the place, because servos different brands, for the same signal, different brands of servo rotation angle will be different. After understanding the basics since we can learn to control a servo, and this experiment need only servos a few components, jumpers a bundle on it. RB-412 servos * 1 Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Breadboard Jumper * a tie Arduino control with steering in two ways, one is through the Arduino ordinary digital sensor interface produce different duty cycle square wave, analog servo positioning generate a PWM signal, the second is the direct use of Arduino comes Servo function steering control, this control method has the advantage of programming, the disadvantage is only control two-way steering, because Arduino own function only use digital 9,10 interface. Arduino drive capability is limited, so when you need to control one or more servos require an external power supply. Here we have a module control via potentiometer rotation servos Use Original: arduino board * 1 Potentiometer module * 1 9 g servos * 1 Sensor cable * 1 Here we must be careful not to use the computer usb power supply, because if the current demand is greater than 500ma, usb may be burned, it is recommended to use an external battery powered. Let Programming: Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

A good job, then click (download to ARDUINO), ARDUINO programming interface code will appear ************************************************** *************************** # Include <Servo.h> int _ABVAR_1_val; int _ABVAR_2_servo; Servo servo_pin_9; void setup () _ABVAR_1_val = 0; servo_pin_9.attach (9); _ABVAR_2_servo = 0; void loop () _ABVAR_1_val = AnalogRead (A0); _ABVAR_2_servo = Map (_ABVAR_1_val, 0, 1023, 0, 180); servo_pin_9.write (_ABVAR_2_servo); Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

************************************************** Burn development board inside the program, we can use a potentiometer control servos. Ardublock zero-based programming routines 10 Ultrasonic Ranging We look first to understand ultrasonic module 1, HC-SR04 module performance is stable, measure the distance accurately, is the highest price the market ultrasonic module, the module can be realized 2cm-4.5m non-contact distance Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

measurement capabilities, with 2.4-5.5V wide voltage input range, static consumes less than 2mA, comes with a temperature sensor for correction ranging results, but also has GPIO, serial, and other means of communication, which with the watchdog, stable and reliable. 2, the main technical parameters: 1) Use voltage: DC5V 2) Static current: less than 2mA 3) level output: high-5v Low 0V 4) Serial output: 9600 baud, 1 start bit, 1 stop bit, 8 data bits, no parity, no flow control. 5) Sensor angle: not more than 15 degrees 6) Detection distance: 2cm-450cm 7) Precision: 0.3cm +1% 8) board size 20 * 45 * 1.6mm 3 Wiring: VCC, trig (control side) / TXD, echo / RXD (receiving end), GND. 4 Usage: 10US a control population made a high of more than, you can wait to receive high output port. A timer can be opened with the output timing, when this port goes low when you can read timing The value of this time on time for this distance, only calculate the distance. This constant cycle of measurement, you can reach the value of the mobile measurement ~ ~ 5 Module works: Only need Trig / TX pin input a high of more than 10US, the system may issue 8 40KHZ ultrasonic pulse, and then detect the echo signal. When the echo signal is detected, the module also for temperature measurement, and then the ranging result of the current temperature correction, the corrected results by Echo / RX pin output. In this mode, the module into the distance value is 340m / s when the time value of 2 times, a high level side output by Echo, according to the duration of this high value to calculate the distance. Ie, the distance values are: (High Time * 340m / s) / 2. Note: Because the distance value temperature correction has been, at this time no longer according to the ambient temperature on the ultrasonic sound velocity correction, that no matter how much the temperature, velocity selection 340m / s can be. Let's experiment, first press the figure's identity, the ultrasonic connected to ARDUINO, Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Look real connection diagram Connect Well, we started programming: Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

A good job, then click download to ARDUINO, ARDUINO programming interface code will appear ************************************************** *************************** int ardublockultrasonicsensorcodeautogeneratedreturncm (int trigpin, int echopin) int duration; pinmode (trigpin, OUTPUT); pinmode (echopin, INPUT); digitalwrite (trigpin, LOW); delaymicroseconds (2); digitalwrite (trigpin, HIGH); delaymicroseconds (5); digitalwrite (trigpin, LOW); duration = pulsein (echopin, HIGH); duration = duration / 59; return duration; int _ABVAR_1_t1; void setup () Serial.begin (9600); digitalwrite (4, LOW); _ABVAR_1_t1 = 0; void loop () _ABVAR_1_t1 = ArdublockUltrasonicSensorCodeAutoGeneratedReturnCM (4, 5); Serial.print ("distance:"); Serial.print (_ABVAR_1_t1); Serial.println (""); delay (1000); Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

************************************************** *************************** Download a good program we can see in ARDUINO serial surveillance ultrasonic distance measurement values Ultrasound can be clearly felt by hand block value changes Well, this section is on here, we can use your imagination, the ultrasound is applied to other design go above. Ardublock zero-based programming routines 11 PS2 joystick module Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

First, the product description The company produces PS2 game joystick axis sensor module consists of using original quality metal PS2 joystick potentiometer system For, with (X, Y) 2-axis analog output, (Z) 1 digital output channel button. With Arduino sensor expansion board can be made For remote control and other interactive work. In addition the product in order to allow customers to more easily fit arduino expansion boards and other standard interfaces Mouth, in the design of the X, Y, Z-axis circuit leads individually, you can use three pin ARDUINO dedicated line directly into the expansion board for use. It is convenient. Second, product characteristics It is like a game console joystick, you can control the joystick module input x, y, z of Values, and to achieve a particular value in a function, it can be considered a combination of buttons and a potentiometer. Data Type of x, y dimension for the analog input signal is a digital input signal z dimension, therefore, x and y connected to the analog port Pin sensor end, and z port is connected to the digital port. Third, the use On how to use, we first look at how it works now, so we know it is there in the end How, which we find it helpful to use, there is a functional diagram below, we take a look Now we should clear it, in fact, it is a potentiometer Well, x, y dimension of the data output is analog Port readout voltage value, is not a little surprised. Of course, this is not shown above, z- dimensional data output, in fact, it is more Simple, we know that z-dimensional output only 0 and 1, then it can be achieved through a button bar. Now on we should Surface of saying, it is a potentiometer and button combination (To be honest, if you do not understand it just to see that Sentence is a bit foggy it? ). After reading the chart I believe we all know how to use it right Arduino, x, y dimension we received two analog ports Read their values, z dimension we are to the digital port, and so on the line, plus the power and ground, so fine.... Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Fourth, the module test Let's look at this test what things we have, in fact, not much.... Arduino controller 1 USB data cable 1 Joystick Module 1 Here x I connected an analog port 0, y even an analog port 1, Even a good circuit, now we come Programming: Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Fourth, the module test Let's look at this test what things we have, in fact, not much.... Arduino controller 1 USB data cable 1 A good job, then click download to ARDUINO, ARDUINO programming interface code will appear ************************************************** *************************** int _ABVAR_2_y; int _ABVAR_1_x; void setup () _ABVAR_2_y = 0; Serial.begin (9600); _ABVAR_1_x = 0; void loop () _ABVAR_1_x = AnalogRead (A0); _ABVAR_2_y = AnalogRead (A1); Serial.print ("x:"); Serial.print (_ABVAR_1_x); Serial.println (""); Serial.print ("y:"); Serial.print (_ABVAR_2_y); Serial.println (""); delay (500); ************************************************** **************************** Download a good program we can see in ARDUINO serial surveillance joystick module X-axis and Y-axis values Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Hand shake joystick module X-axis and Y-axis, we can clearly see that the number of changes The introduction of the game joystick module on to this, in fact, use it to make a pretty good thing, we can enjoy the Imagination. Ardublock zero-based programming routines 12 LM35 temperature sensor experiment LM35 is a very common and easy to use temperature sensor element, the components need only one application LM35 components, using only an analog interface can be, on the difficulty lies in the algorithm will read the analog value is converted to the actual temperature. Connect the circuit according to the following diagram. Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

Let Programming: A good job, then click download to ARDUINO, ARDUINO programming interface code will appear ************************************************** *************************** int _ABVAR_2_dat; Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&

int _ABVAR_1_val; void setup () _ABVAR_2_dat = 0; _ABVAR_1_val = 0; Serial.begin (9600); void loop () _ABVAR_1_val = AnalogRead (A0); _ABVAR_2_dat = ((5 * _ABVAR_1_val) / 10); Serial.print ("TEMP ="); Serial.print (_ABVAR_2_dat); Serial.println (""); delay (100); ************************************************** Download a good program we can see the current ARDUINO serial monitor the temperature of the Above is our finishing Ardublock zero-based programming 12 routines, of course, there are many applications ARDUINO, we hope to learn communication ************************************************** **************************** Products http://www.amazon.com/s/ref=bl_sr_pc?_encoding=utf8&