Go Down

Topic: Telemetry for analysis (Read 928 times) previous topic - next topic


I have a robot running an Arduino Uno R3, the ethernet shield, and a RobotOpen shield. I was thinking of having the robot save data such as voltage over time and speed over time, and possibly current over time to the SD card slot on the ethernet shield (with a 1 gb card of course) for later analysis on my computer. But im not sure how to A)have it read and write the data to the card and B)not sure how to have the data in a format that I can read. This is the existing code for a Tank Drive style setup:

#include <SPI.h>
#include <Ethernet.h>
#include <RobotOpen.h>

/* I/O Setup */
USBJoystick usb1('0');  // Assign the logitech USBJoystick object to bundle 0

void setup()
  /* Initiate comms */

/* This is your primary robot loop - all of your code
* should live here that allows the robot to operate
void enabled() {
  // Constantly update PWM values with joystick values

/* This is called while the robot is disabled
* You must make sure to set all of your outputs
* to safe/disable values here
void disabled() {
  // PWMs are automatically disabled

/* This loop ALWAYS runs - only place code here that can run during a disabled state
* This is also a good spot to put driver station publish code
* You can use either publishAnalog, publishDigital, publishByte, publishShort, or publishLong
* Specify a bundle ID with a single character (a-z, A-Z, 0-9) - Just make sure not to use the same twice!
void timedtasks() {
  RobotOpen.publishAnalog(ANALOG0, 'A');   // Bundle A
  RobotOpen.publishAnalog(ANALOG1, 'B');   // Bundle B
  RobotOpen.publishAnalog(ANALOG2, 'C');   // Bundle C
  RobotOpen.publishAnalog(ANALOG3, 'D');   // Bundle D
  RobotOpen.publishAnalog(ANALOG4, 'E');   // Bundle E
  RobotOpen.publishAnalog(ANALOG5, 'F');   // Bundle F

/* This is the main program loop that keeps comms operational
* There's no need to touch anything here!!!
void loop() {
  if (RobotOpen.enabled())

So where would I insert a code set for data capturing and how wold that be set up? My dead line is the 26th since this is for a team project so all help is appreciated


But im not sure how to A)have it read and write the data to the card

What is "it" that will be reading the data? What data?

Have you looked at any of the examples that come with the SD library?

and B)not sure how to have the data in a format that I can read.

What formats can you read? Save the data as text and read it as text.

This is the existing code

Without the code tags...
The art of getting good answers lies in asking good questions.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131