-
You Reply: {
// if there are incoming bytes available
// from the peer device, read them and print them:
while (Serial.available()) {
int in;
while ((in = Serial.read()) == -1);
Serial.print((char)in);
}
-
You Reply: no have the sheild working fully and switiching modes but have a problem with formating the sketch to upload to pachube - works fine in a terminal program but not in a sketch
-
You Reply: no have the sheild working fully and switiching modes but have a problem with formating the sketch to upload to pachube - works fine in a terminal program but not in a sketch
-
You Reply: got it sorted as below
Serial.print("+"); //put in command mode
delay(300);
Serial.print("+");
delay(300);
Serial.print("+");
delay( 5000 ); //hang round on command mode for a bit - no reason
Serial.println("ATO"); // send a command to ensure back in data mode
Serial.flush();
-
You Reply: got it sorted as below
Serial.print("+"); //put in command mode
delay(300);
Serial.print("+");
delay(300);
Serial.print("+");
delay( 5000 ); //hang round on command mode for a bit - no reason
Serial.println("ATO"); // send a command to ensure back in data mode
Serial.flush();
-
You Reply: got it sorted as below
Serial.print("+"); //put in command mode
delay(300);
Serial.print("+");
delay(300);
Serial.print("+");
delay( 5000 ); //hang round on command mode for a bit - no reason
Serial.println("ATO"); // send a command to ensure back in data mode
Serial.flush();
-
You Reply: Bit more info
the wizfi script
SerialClearBuffer(@COM)
MakeString(#SParam11, "+++")
SerialSendString(@COM, #SParam11, [color=red][b]0[/b][/color])
UXMessageText(1, "Sent +++...")
Sleep(1000)
this works fine to take out of data mode --- but change the 0 for a 1 or 2 and it will not work
SerialClearBuffer(@COM)
MakeString(#SParam11, "AT")
UXMessageText(1, "Sent AT again...")
Sleep(1000)
SerialSendString(@COM, #SParam11,[color=red][b] 2[/b][/color])
the rest of the scrpts have a 2 in the same place
?? what does the 0 & 2 do?
-
You Reply: Decided to test all this on my unit and same issue - can get into data mode but unable to get back to command mode via any sketch ... intereseting to note it you try the WizSmartScript gui interface you can toggle between command and data easy and when the script is ooked at it uses "+++" and "at"...but maybe it is doing something else ... [b]Hector[/b] maybe the guy that created the WizSmartScript gui could elighten us
This would also enable me to solve my data to pachube issue if i could toggle between the modes..
-
You Reply: thought "0x1B" was the esc command from the documentation
-
You Reply: thanks hector
what i did find is this but how would this get transfered over to an Aduino Sketch?
the fist section up to #9 works fine from the terminal window but don't know how to get unit to accept the <esc> command etc
geoff
4.1 Example: Posting to Pachube.com
1. Associate with AP
AT+NDHCP=1
AT+WWPA=password
AT+WA=DexterIndustries,,01
2. Start TCP Client to Pachube’s IP and port 80
AT+NCTCP=173.203.98.29,80
3. Send data to remote server by using the <ESC>S sequence and the CID number:
Enter the [ESC] key
Enter the [S] key
Enter the [CID number from step 3]
4. Copy the highlighted text, and paste it on Tera Term (via the "Edit" menu, choose "Paste" Option)
PUT /v2/feeds/11366.csv HTTP/1.1
User-Agent: curl/7.19.5 (i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3
libidn/1.15
Host: api.pachube.com
Accept: */*
X-PachubeApiKey:
103338a658c84debc9d4d0609362056882b6ccaa312d3de7fbde57e592630007
Content-Length: 4
Content-Type: application/x-www-form-urlencoded
1,44
5. Indicate end of transmission by using the <ESC>E sequence:
Enter the [ESC] key
Enter the [E] key
-
You Reply: thanks hector
what i did find is this but how would this get transfered over to an Aduino Sketch?
the fist section up to #9 works fine from the terminal window but don't know how to get unit to accept the <esc> command etc
geoff
4.1 Example: Posting to Pachube.com
1. Associate with AP
AT+NDHCP=1
AT+WWPA=password
AT+WA=DexterIndustries,,01
2. Start TCP Client to Pachube’s IP and port 80
AT+NCTCP=173.203.98.29,80
3. Send data to remote server by using the <ESC>S sequence and the CID number:
Enter the [ESC] key
Enter the [S] key
Enter the [CID number from step 3]
4. Copy the highlighted text, and paste it on Tera Term (via the "Edit" menu, choose "Paste" Option)
PUT /v2/feeds/11366.csv HTTP/1.1
User-Agent: curl/7.19.5 (i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3
libidn/1.15
Host: api.pachube.com
Accept: */*
X-PachubeApiKey:
103338a658c84debc9d4d0609362056882b6ccaa312d3de7fbde57e592630007
Content-Length: 4
Content-Type: application/x-www-form-urlencoded
1,44
5. Indicate end of transmission by using the <ESC>E sequence:
Enter the [ESC] key
Enter the [E] key
-
You Reply: yes have proven all working fine and can even connect to pachube via terminal using "AT" commands -- then change jumpers to wifi -
but how do i send via an arduino sketch - the unit takes the "at" commands fine but when arriving at <esc> codes the unit appears to error, how are the +++ are passed to get in to a command mode to push the data?
thanks
Geof
-
You Reply: yes have proven all working fine and can even connect to pachube via terminal using "AT" commands -- then change jumpers to wifi -
but how do i send via an arduino sketch - the unit takes the "at" commands fine but when arriving at <esc> codes the unit appears to error, how are the +++ are passed to get in to a command mode to push the data?
thanks
Geof
-
You Reply: thank
What I need to know is how to communicte the arduino data to the wifi shield - there does not appear to be a libary for the sheild and i am unsure what pins the shield uses to communicate with the arduino board
eg does it use SPI using Arduino digital pins 10-13 (CS, MOSI, MISO, SCLK respectively)?
and do i use the ethernet libary --
do i leave in usb pin mode or wifi pin mode (jumpers)
So i want to leave out the pc bit and let the wifi shield replace the ethernet sheild to send to pachube via the network
Geoff
-
You Reply: thank
What I need to know is how to communicte the arduino data to the wifi shield - there does not appear to be a libary for the sheild and i am unsure what pins the shield uses to communicate with the arduino board
eg does it use SPI using Arduino digital pins 10-13 (CS, MOSI, MISO, SCLK respectively)?
and do i use the ethernet libary --
do i leave in usb pin mode or wifi pin mode (jumpers)
So i want to leave out the pc bit and let the wifi shield replace the ethernet sheild to send to pachube via the network
Geoff
-
You Reply: Hello
I have one of the above shields and it is all working fine -- I can connect to pachube via a terminal (putty) but am unable to have it connect through a andruino sketch would someone be able to post a sample sketc that can upload data to pachube.
Have tried the ethernet libary - no go... tried serialsoft libary using rx/tx on pins 1&2 see some action but no connect
Thanks for any assistance