Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Arduino IDE WITH other language on: June 20, 2013, 09:44:47 am
I try to using a Chinese Language to instead of Processing language..
By when a looking source code of Arduino.
I don't know how to do .

what i know:
Arduino use Antlr
I just use Antlr from Chinese to Processing.But don't know how to do .
I think use English will be hard to Chinese children..
2  Using Arduino / Programming Questions / Re: How i2c can't be work with UNO and pro mini send lots of Data. on: December 07, 2012, 09:19:13 pm
I think the event will receive the data with be pause.And the loop function with continue to the work.So the result it shows:
Code:
15
fd
52
fd
14
fd
fd
as so on...
I don't know how I can receive such like the 15.52 and store it.last it change from Arduino example,but just a simple example.
3  Topics / Home Automation and Networked Objects / Re: i want to control the lights in my house on: December 07, 2012, 07:40:31 am
I use the HTC G1+Arduino UNO to build a system.
May be you can use like a to remote control the system/
4  Using Arduino / Programming Questions / How i2c can't be work with UNO and pro mini send lots of Data. on: December 07, 2012, 07:36:59 am
I try to send temperature data form the Arduino pro mini to the Arduino UNO.But lose a lot data but the first .
I think the i2c work like a multi-threading .So,I do this code.But How I could send a data easy???
The temperature it a double number,I couldn't recevie the data formally.
Code:
#include <Wire.h>

int test[]={};
int i=0;
void setup()
{
  Wire.begin(4);                // join i2c bus with address #4
  Wire.onReceive(receiveEvent); // register event
  Serial.begin(9600);           // start serial for output
}

void loop()
{
  delay(400);
  Serial.println("fd");
}

// function that executes whenever data is received from master
// this function is registered as an event, see setup()
void receiveEvent(int h)
{
 
    while(1 < Wire.available()) // loop through all but the last
    {
      char c = Wire.read(); // receive byte as a character
      Serial.print(c);         // print the character
    }
   int  x=Wire.read();
   Serial.println(x);
   delay(100);
}



Code:
#include <Wire.h>
void setup()
{
  Wire.begin(); // join i2c bus (address optional for master)
}

byte x = 0;

void loop()
{
  double z=15.52;
  int t=(int)z;
  int y;
  y=(z-t)*100;
  byte ts=14;
 
  delay(500);
  Wire.beginTransmission(4); // transmit to device #4
  Wire.write(y);
  Wire.endTransmission();    // stop transmitting
  delay(500);
  Wire.beginTransmission(4); // transmit to device #4
  Wire.write(t);
  Wire.endTransmission();    // stop transmitting
  delay(500);
  Wire.beginTransmission(4); // transmit to device #4
  Wire.write(ts);
  Wire.endTransmission();    // stop transmitting

}


5  Topics / Home Automation and Networked Objects / Re: Stay at home .Try to build a Home Automation,Now have a basic project on: December 07, 2012, 07:29:48 am

6  Topics / Home Automation and Networked Objects / Stay at home .Try to build a Home Automation,Now have a basic project on: December 07, 2012, 07:22:20 am
I try to make a project to make this project.Sorry for my poor English.
Use the Webpage to Control the arduino devices throungh the Android,now it is works.
But i think i need more suggest.
this is the finally work:


visit:http://api.phodal.com


Maybe some one to join us.?

This is the code of the pro mini commucation to the UNO.It work but not very good.use i2c but only 1 byte data.So
Pages: [1]