Tuesday, April 22, 2014

Sensor Graph arduino with CDS :: Arduino Android Shield : Using AppGosu ADK

Sensor Graph arduino with CDS 
     :: Arduino Android Shield : Using AppGosu ADK

Direct android programming Using Arduino
Don’t need android SDK, use only arduino





Function :
CDS circuit detects the light.
Arduino : ADC, transmit the data to AppGosu module.
AppGosu : draw the graph in Android phone




Step 1 :  Install
1. AppGosu :: Arduino-Android Library from GitHub   for Arduino
2. Install the app, AppGosu for android shield from Google play

3. Connect AppGosu PRISM Module to Tx pin in Arduino  at www.ebay.com




Step 2 : Circuit
 



(connection)


Arduino       AppGosu PRISM
--------------------------------------
   RX(D0)             TX    (1)
   TX(D1)             RX    (2)
    GND               GND  (3)
     5V                 VCC  (4)
   



Step 3 : Arduino and Android Program
(arduino & Android programming)



// Sensor Graph with CDS
// ADC with color changing

#include "AppGosu.h"
AppGosu app;


int ADC_pin = A3;
int value = 0;
int send_data = 0;
int pre = 300;
int delay_cmd = 20;

void setup() {     
  delay(2000);
 
  app.setDelayCmd(20);
  app.start();


  myStart();  
}  // end of setup

void loop() {

    loop_data();

 } // end of loop


int x1 = 1;
int inc = 5;
int line_color = 11;
 

void loop_data() {
      value = analogRead(ADC_pin);  // int(0 to 1023)
      send_data = map(value,0,1023, 0, 360);
      send_data = send_data + 300; // base line
     
      app.line(x1, pre, x1+inc, send_data);
     
      x1 = x1 + inc;
      if( x1 > 470) {
         app.fill(0,0,0);
         app.stroke(255,255,255);
         app.rect(1, 300, 478, 370);
         if(line_color == 11) app.stroke(255,255,255);
         if(line_color == 12) app.stroke(255,255,0);
         if(line_color == 13) app.stroke(255,0,0);
         x1  = 1;
      }
      pre = send_data;
      //delay(20);
} // end of loop
//+++++++++++++++++++++++++++++++++++++++++++++++++
 

//===  serial event From android phone  ======================
void serialEvent() {
      app.serialMessage();
      EventLoop();
}


void EventLoop() {
    if( app.btConnected()) {  myStart();   }


    if( app.eventButton(11)) {
        line_color = 11;
        app.stroke(255,255,255);
    }
   
    if( app.eventButton(12)) {
        line_color = 12;
        app.stroke(255,255,0);
    }
    if( app.eventButton(13)) {
        line_color = 13;
        app.stroke(255,0,0);
    }
}

//===  For android program  ======================
void myStart(void) {
  app.clearAll();
  app.background(0,0,0);
  app.textSize(70);
  app.background(10,50,70);
  app.fill(100, 150, 100);
  app.text("ADC Graph", 50, 100);
  app.fill(255,255,255);
  app.textSize(30);
  app.text("..bluetooth communication..",  30, 150);
  app.textSize(30);
  app.text("by AppGosu", 50, 200);
  app.stroke(250, 250, 250);
  //app.noStroke();
  app.fill(0,0,0);
  app.rect(1, 300, 478, 370);
  app.stroke(255,255,255);
 
  app.fill(255,255,255);
  app.text("Change  the color", 50, 700);
  app.button("White", 50, 715, 120, 80,  11);
  app.button("Yellow",200, 715, 120, 80,  12);
  app.button("Red",   350, 715, 120, 80,  13);
}
//=================================================



 

Result :
(video)




More information :   www.AppGosu.com

by AppGosu




6 comments:

  1. I guess I am the only one who came here to share my very own experience. Guess what!? I am using my laptop for almost the past 2 year! but I had no idea of solving some basic issues. I do not know how to fullcrackedpc.com But thankfully, I recently visited a website named vsthomes.com
    licenselinks.info
    GraphPad Prism Crack
    MacKeeper crack
    KeyShot Pro crack

    ReplyDelete
  2. I guess I am the only one who comes here to share my very own experience guess what? I am using my laptop for almost the post 2 years.
    Reason Crack
    Miracle Box Crack
    EaseUs Todo Backup Crack
    Stellar PST Splitter Crack
    Driver Toolkit Crack
    Ashampoo Driver Updater Crack

    ReplyDelete
  3. GraphPad Prism Crack I am very impressed with your post because this post is very beneficial for me and provide a new knowledge to me

    ReplyDelete
  4. I am very impressed with your post because this post is very beneficial for me and provide a new knowledge..
    https://crackexe.net/https://crackexe.net/
    graphpad-prism-crack
    magoshare-data-recovery-crack
    avast-cleanup-crack
    truecaller-premium-crack
    winstep-nexus-ultimate-crack
    careueyes-pro-crack

    ReplyDelete
  5. I guess I am the only one who came here to share my very own experience. Guess what!? I am using my laptop for almost the past 2 years, but I had no idea of solving some basic issues. I do not know how to Download Cracked Pro Softwares But thankfully, I recently visited a website named wahabtech.net
    CAREUEYES PRO Crack

    ReplyDelete