2015年2月14日星期六

Snap for Arduino

Snap for Arduino

For the Micro controller , there have two software need to be installed :
  1.  Arduino
  2. Snap4Arduino
The Arduino used to link the micro controller 
  1. write down the coding on the window and check it correct 
  2. upload to the micro controller and see the light on the board is flashing 
  3. after done uploading , the micro controller start working 

The Snap4Arduino as a carries between Arduino and micro controller , convenient for write down the program . 

First example : LED
Give something need to be keep attention : 
  • connect arduino , get the number same with your link 
  • digital as the output 
  • set the digital pin as true , let it lighting , as false , it will off 
  • wait time must not too long , 2-3 seconds 
  • click play LED will work
  • phenomenon : LED light 2 seconds and off 3 seconds 
Second example : Potentiometer 
Connect potentiometer to the snap for arduino 
  • make a variable for show number of control 
  • the second variable for the control the size of pic 
  • let the pot "/" by 1024bit become 100%
  • the foreground must be " png", click it and program is occur 
  • give the size present 
  • click all of the program and the edge light , so the whole program will be work 
  • phenomenon : revolve knob , foreground will change it`s size and number will change at the same time
Third example : Switch to Costume
  • after you setup digital pin , you should connect arduino , till succeed 
  • in the loop , digital reading for get the code to control image 
  • give two pics in costume 
  • phenomenon : when click button , the image change from large to small
Fourth example : Servo Motor 
  • link the motor to digital pot 
  • after connect arduino select the pot same with the hardware 
  • key left -clockwise/ right -counter clockwise 
  • phenomenon : when click left and right button on the keyboard , the servo motor will turn as the program set