Skip to content

PachubeArduino for RN-XV - Serial interface #1

@nicox77

Description

@nicox77

Hi Blawson,
Thanks for this great code, but I've got an issue actually :

My archi :

I need to use the Serial from my Arduino (needed by the XBEE board), but your code is for Ethernet only, can you please help me ?

See my actual code below (not working, only "Connecting to Pachube..." on the Serial port without more, many thanks !


include <SPI.h>

include <Ethernet.h>

include <Pachube.h>

byte mac[] = {0x90, 0xA2, 0xDA, 0x00, 0x10, 0x8f};
char apiKey[] = "MY KEY";
long feedId = MY FEED;
char datastreamId[] = "0";

PachubeClient client = PachubeClient(apiKey);

void setup() {

pinMode(A0,INPUT);
//digitalWrite(A3,HIGH) ecrire sur une ligne io digital
// lots of time for the WiFly to start up and also in case I need to stop the transmit
delay(10000);

Serial.begin(9600);

}

void loop()
{
// read the sensor
double sensorReading = 1.75;//analogRead(A0);

// send to the Pachube client
client.updateFeed(feedId, datastreamId, sensorReading);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions