Pages

Ads 468x60px

Labels

Linkie ♥

03 January, 2013

Arduino on MK802 Lubuntu

Arduino 1.0 whit serial monitor on MK802 Lubuntu 12.04 LXDE 


1. Download install Arduino by apg-get
linaro@linaro-alip:~$ sudo apt-ger install arduino 
or root user 
root@linaro-alip:~# apt-get install arduino
Reading package lists... Done
Building dependency tree       Reading state information... DoneThe following extra packages will be installed:  arduino-core avr-libc avrdude binutils binutils-avr ca-certificates-java  default-jre default-jre-headless gcc gcc-4.6 gcc-avr java-common  libatk-wrapper-java libatk-wrapper-java-jni libftdi1 libgomp1 libjna-java  librxtx-java openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib tzdata  tzdata-java 

2. Start Arduino from LXDE Menu panel > Programming > Arduino IDE
Menu Arduino IDE 
3. Plug-in Arduino UNO USB to MK802 USB
check dmesg after plug-in UNO. find USB ACM Device
root@linaro-alip:~# dmesg
[ 5342.530000] usb 1-1: new full speed USB device number 2 using sw_hcd_host0[ 5342.700000] cdc_acm 1-1:1.0: ttyACM0: USB ACM deviceorroot@linaro-alip:~# lsusbBus 001 Device 002: ID 2341:0001orroot@linaro-alip:~# lsmodModule                  Size  Used bycdc_acm                18935  0orroot@linaro-alip:~# ls -l /dev/ttyA*crw-rw---- 1 root dialout 166, 0 Jan  2 17:25 /dev/ttyACM0
4. Setup Arduino IDE to Arduino UNO USB

  • Set Arduino Board by Menu Tools > Board > UNO 


  • Set Serial by Menu Tools > SerialPort > /dev/ttyACM0


  • Test Blink program from Menu File > Examples > 1.Basic > Blink
  • Verifly and Upload to Arduino UNO
  • Check status bar show  "Done Uploading... and check on Arduino  LEB  is Blink!!

5. Test Arduino IDE to Serial Monitor

  • New Sketch by Selece menu File > New.
  • Type program  "Hello MK802" below
int LED = 13;   //LED on board
void setup(){
 Serial.begin(9600);
 pinMode(LED, OUTPUT);
}
void loop(){
  digitalWrite(LED, LOW);
  Serial.println("Hello MK802 Lubuntu");
  digitalWrite(LED, HIGH);
  delay(2000);
}

  • Verify/Compile and Upload program to Arduino UNO.  


                              • Select menu Tools > Serial Monitor  to serial monitor.


                              0 comments:

                              Post a Comment