GraphN‎ > ‎

M2M Arduino

What do you need for this project:
  • Arduino UNO
  • RaspberryPi
  • HTTP Server with PHP support.
  • M2M_ARH code (available on google code)
  • and whatever you like to connect to your Arduino.

Machine-2-Machine (M2M) communication between two or more Arduinos over the internet. Control each pin or read values from any pin on the Arduino board, from your HTTP server anywhere on the web. Your web application  can manage multiple Arduinos in a single application. Also, make a web interface to manually control your Arduinos.  Currently, the RaspberryPi is acting only as a client towards the Arduino and the HTTP server in order to enable the communication end-to-end. Example, control a stepper motor from a webinterface or information from another Arduino.

Requirements:
  1. All application logic running on a HTTP server
  2. Generic sketch running on the Arduino
  3. Generic client running on the RaspberryPi
  4. Arduino like API (PHP) to be used for any application
PHP API examples:

//====================================
// digitalWrite($id,$pin,$value)
// Example: digitalWrite(1111,1,HIGH);
// Set digital pin 1 on Arduino=1111 to HIGH
//
// analogWrite($id,$pin,$value)
// Example: analogWrite(1111,2,123);
// Set digital pin 1 on Arduino=1111 to 123 (0 - 255) PWM
//
// digitalRead($id,$pin)
// Example: digitalRead(1111,2);
// Return value (HIGH or LOW, i.e. 1/0) of digital pin 2 on Arduino=1111
//
// analogRead($id,$pin)
// Example: analogRead(1111,2);
// Return value (0 - 1023) of analog pin 2 on Arduino=1111

// pinMode($id,$pin,$value)
// Example: pinMode(1111,5,INPUT)
// Set pinmode to INPUT for digital pin 5 on Arduino=1111 // stepper($id,$direction,$steps) // Example: stepper(1111,0,10); // Step steppermotor 10 steps ClockWise // ClockWise = 0, CounterClockWise = 1 // Fixed pin usage: D10=direction,D11=step,D12=sleep
//====================================

Comments