Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Programming Questions / Re: Putting Xbee API i/o data sample into variable on: February 01, 2014, 01:06:04 pm
Hello Team

Code:
String apiData;

void setup() {
  Serial.begin(9600);
}

void loop() {
  int dataSize = 12;
  apiData = "";

  byte payLoad [dataSize];

  payLoad[0] = 0x7E;
  payLoad[1] = 0x00;
  payLoad[2] = 0x12;
  payLoad[3] = 0x92;
  payLoad[4] = 0x00;
  payLoad[5] = 0x13;
  payLoad[6] = 0xA2;
  payLoad[7] = 0x00;
  payLoad[8] = 0x40;
  payLoad[9] = 0xA8;
  payLoad[10] = 0x2F;
  payLoad[11] = 0xF2;

  for (int i = 0; i<dataSize; i++) {
    apiData.concat(payLoad[i]);
  }
 
  Serial.println(apiData); // This will print 12601814601916206416847242
   
}

Question is, what is needed so that apiData contains a true String with "7E 00 12 92 00 13 A2 00 40 A8 2F F2" ?

Still puzzled.

Team BTF
2  Using Arduino / Programming Questions / Re: Putting Xbee API i/o data sample into variable on: January 29, 2014, 09:46:15 am
Quote
Of course. But, you are not even starting from the right spot, let alone going the right direction.

Thanks for the pointer. We think we got our variable declaration wrong after re-visited the Arduino reference section.

http://arduino.cc/en/Reference/HomePage

Quote
The incoming bytes are 0x7E, 0x00, 0x14, etc.

In this case, would byte or char datatype more make sense being used first to hold the incoming data?

Cheers, Team BTF
3  Using Arduino / Programming Questions / Re: Putting Xbee API i/o data sample into variable on: January 28, 2014, 04:23:16 pm
Found this thread from within forum which is very close to what I am looking for.

http://forum.arduino.cc/index.php?topic=213493.0

Advice, input anyone?

Cheers, Team BTF
4  Using Arduino / Programming Questions / Putting Xbee API i/o data sample into variable on: January 28, 2014, 11:55:56 am
Here is a sample API format for Zigbee I/O Data Sample

7E0014920013A20040522BAA7D840101001C0200140225F5

We can tell the frame type is 92 and the data length is 14 (Both values are in Hex)

We are trying to capture this API data stream without using library as assistance, using serial.read() that reads 1 byte at a time. We created a "for loop" and an "array" to store incoming data, however the array is not storing "7E", "00", "14" .... so on but in decimal format.

Any idea to have (1) the value in array converted from (Dec to Hex) and (2) Compose everything from array to another string variable? Want to achieve something like this below?

Code:
String APIData;
APIData = (payload[0], HEX) + (payload[1], HEX) + (payload[2], HEX) + (payload[3], HEX) + (payload[4], HEX)........

// APIData should contains "7E7E00149200....."

Is this doable?

Thanks, Team BTF
5  Using Arduino / Networking, Protocols, and Devices / Re: HDG104/HDG204 - Arduino WifiShield Failures on: September 27, 2013, 08:38:46 am
A quick scanning of forum showed

1. User community sticks with ethernet LAN based shield
2. Seven out of 10 user have problem running Wifi shield
3. Eight out of 10 run into issue upgrading the firmware
4. Nine out of 10 need to use Arduno 1.0.2 (not the latest IDE) to get WiFi working
5. We still can't get static IP address to work! even after firmware update.

We too have a "AT32UC3A1512" but issued command successfully.
batchisp.exe -device AT32UC3A1256 -hardware usb -operation erase f memory flash blankcheck loadbuffer c:/wifi_dnld.elf program verify start reset 0

http://www.binarytaskforce.com/Weblog/2013/09/21/arduino-wifi-firmware-update/

Hope this helps, Team BTF
6  Using Arduino / Networking, Protocols, and Devices / Re: Arduino WiFi Shield firmware update on: September 27, 2013, 08:22:54 am
Ito,

One more suggestion.

Review the Wifi firmware update page http://www.dfrobot.com/community/how-to-upgrade-arduino-wifi-shield-firmware-on-windows.html. Note there is a USB Driver for AT32UC3 microcontroller on Windows listed in Tools section?

http://www.dfrobot.com/image/data/TEL0064/AVR32%20USB%20Driver.zip

Download and install the driver, perform the update again.

Team BTF
7  Using Arduino / Networking, Protocols, and Devices / Re: Arduino WiFi Shield firmware update on: September 24, 2013, 09:04:06 am
Hello Ito,

Sounds like USB driver needs to be updates.

From Atmel support:

Follow the instructions detailed in the install.txt file in C:\Program Files\ATMEL\FLIP X.X.X\info Directory.
Please, read the sections :
NEW USB DRIVER INSTALLATION for Windows 2000 or
NEW USB DRIVER INSTALLATION for Windows XP

Team BTF
8  Using Arduino / Networking, Protocols, and Devices / Re: Problem with wifi shield on: September 21, 2013, 11:49:41 pm
You might want to follow our notes on updating Wifi shield firmware.

http://www.binarytaskforce.com/Weblog/2013/09/21/arduino-wifi-firmware-update/

Good luck, Team BTF
9  Using Arduino / Networking, Protocols, and Devices / Re: How to check Arduino wifi firmware update success? on: September 21, 2013, 11:46:33 pm
Our says

$ Arduino Wifi Startup... [Sat Jan 19 09:44:18 2013]
Connect to network...OK

Cheers, Team BTF
10  Using Arduino / Networking, Protocols, and Devices / Arduino WiFi Shield firmware update on: September 21, 2013, 08:19:11 pm
Hello everyone,

Following this forum and many user discussions related to wifi shield firmware update, we decided to perform the update ourselves. We followed the procedure from http://arduino.cc/en/Hacking/WiFiShieldFirmwareUpgrading. It was straight forward and we did this successfully. Passing on the information, we have documented the entire update process with screenshots and output.

http://www.binarytaskforce.com/Weblog/2013/09/21/arduino-wifi-firmware-update/

Hope this helps

Team BTF
11  Using Arduino / General Electronics / Help identify the IC found on Lipo battery on: September 15, 2013, 10:28:48 pm
Here we have a small Lipo battery found within a portable MP3 player. The top section of battery has a simple circuit board and IC.

http://www.binarytaskforce.com/photocontact-album-16

Help identify please!! Could that be a charging function? Take a closer look!

Team BTF
12  Development / Other Hardware Development / Re: Wireless Shield for Xbee + Ethernet Shield R3 + Arduino Mega 2560 R3 on: September 11, 2013, 09:53:55 pm
Well, after some quick look up and I might have the answer folks !!!

If you use an UNO, Ethernet shield uses PIN 11, 12 and 13
If you use a Mega, Ethernet shield uses PIN 50, 51 and 52

Now stack the Wireless SD shield on top

Arduino TX(1) and RX(0) will be used for xbee
SDcard on Ethernet & Wireless SD can not be used.

Rest of the pins are all available. Hope we are correct.

Team BTF
13  Development / Other Hardware Development / Re: Wireless Shield for Xbee + Ethernet Shield R3 + Arduino Mega 2560 R3 on: September 11, 2013, 09:14:28 pm
Surprise that no one able to answer this!

Running into similar plan and wonder if we can stack

Arduino Uno + Ethernet + Wireless shield for Xbee.

Any thoughts?

Team BTF.
14  Using Arduino / Programming Questions / Re: The best way to put all analogRead into one line of String? on: August 25, 2013, 11:07:37 am
Quote
however, we would like to get all values on one line as String
Why? What are you going to do with the String?

Storing all values to a string separate by commas to be send to webserver
15  Using Arduino / Programming Questions / The best way to put all analogRead into one line of String? on: August 25, 2013, 10:25:55 am
Found a "For loop" example from the WebServer sketch to list out all analog Read

Code:
// output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            int sensorReading = analogRead(analogChannel);
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(sensorReading);
            client.println("<br />");       
          }

Works great however, we would like to get all values on one line as String like this:

332,564,432,234,123,343

What would be the most efficient way to achieve this?

Thanks, TeamBTF
Pages: [1] 2 3 4