Show Posts
Pages: 1 2 [3] 4 5
31  Using Arduino / Programming Questions / Sending data from arduino to processing, serially. on: September 09, 2012, 02:50:32 am
I have an arduino duemilanove. I'm trying to send an array of positive and negative floating point numbers, stored within the arduino, to processing.
I was going one step at a time by sending a single byte by using the following code and it worked perfectly.
Code:
void setup()
{
  Serial.begin(9600);
}
byte a=43;
void loop()
{
   Serial.write(a);
 }

And this is the processing sketch.
Code:
import processing.serial.*;

Serial myPort;
void setup()
{
  String portName = "COM4";
 
   myPort = new Serial(this, portName, 9600);
}
void draw()
{
  if(myPort.available()>0)
  {
  println(myPort.read());
  delay(1000);
  }
  else
  {
  println("no devices found");
  }
}

But, by using "byte" datatype i can send only values between 0-255. How can i modify the above programs so that i can send and receive negative and positive floating point numbers.

Thanks.
32  Using Arduino / Sensors / Re: dmp on MPU6050 on: August 19, 2012, 09:59:28 am
Never mind, guys. Got it working. I hadn't noticed the define statements were commented, i had to uncomment them to get the readings. But I haven't got the teapot application working though smiley-sad It just doesn't move. If anyone does get it, Please help me out.
33  Using Arduino / Sensors / Re: dmp on MPU6050 on: August 19, 2012, 09:30:44 am
Sorry, for using your thread. I happened to have your same problem. Like Krodal said, i connected INT of my MPU-6050 to digital pin 2 of the arduino, still the serial monitor displays junk values. Any idea what i should do?
34  Using Arduino / Sensors / Re: simulate MPU-6050. on: August 15, 2012, 11:44:17 am
Actually, that's the same document. Well if you do try it, please let me know. smiley
35  Using Arduino / Sensors / Re: simulate MPU-6050. on: August 15, 2012, 02:42:44 am
Yep got it. smiley-grin installed it.as told in              https://docs.google.com/viewer?a=v&q=cache:wGOxZcVHj58J:invensense.com/mems/gyro/documents/AN-MPU-9150IMF%2520InvenSense%2520MotionFit%2520SDK%2520Quick%2520Start%2520Guide.pdf+&hl=en&gl=in&pid=bl&srcid=ADGEESherjc2YJZQFLGmgss8FyOOLPoaW54oy0MKNtOgtBg9Hv0uEqDKW6dwtYOnUBWwMtd3Q93DTOCnTMWioGhLtTr3bdSKj0j1IksdsAqIcoQhmNT4ozaLJLiFwZdX6Li5bgDa6Dnd&sig=AHIEtbR9iVy9UWZJyH1_BBo4sL_BmzkpTw               , page 8 Created a shortcut and added COM4 to the target, but it still says "unable to open port", when clicked. The arduino is connected to COM4, checked via serial monitor, working perfectly. Any suggestions?
36  Using Arduino / Sensors / Re: simulate MPU-6050. on: August 14, 2012, 11:47:41 am
Sorry for the late reply.
 @krodal  As a matter of fact, i did try your code and it worked perfect. Now i wanted to have some visual feedback, so decided to look ways on simulating it.

@freak174 i registered in invensense, but still was not able to download their teapot software zip. It's not freeware? I did try downloading it from another site, but it returned an error during installation. The code seems to be fine. I also added the MPU6050 and the i2cdev library files.. Is there any other place where i can get my hands on the teapot software?


Thanks
37  Topics / Robotics / Re: Controlling Robot Using cellphone on: August 11, 2012, 03:36:30 am
Quote
The project you linked to is a perfect example.  What does it matter if the phones allow you to control the robot from miles away if you have no means of feedback once it's out of your sight.  How do you control something if you don't know where it is and what's around it?

If the phone in the robot has a camera, you could place a video call to the phone, so you'll be getting a visual feedback. So I'm pretty sure you control it miles away, provided, there is cell phone coverage.
38  Topics / Robotics / Re: Controlling Robot Using cellphone on: August 11, 2012, 03:27:59 am
You would need a dtmf decoder ic. It actually converts the different frequencies that is produced in the key strokes to a digital signal. You could use these digital signals as input to your microcontroller. Connect your dtmf ic to the mobile in your robot, take the digital outs from the dtmf ic to the arduino.
39  Using Arduino / Sensors / simulate MPU-6050. on: August 11, 2012, 02:49:07 am
Hey.

Is there any way i could simulate my MPU-6050, using the teapot or MWC software, I've been searching for the correct arduino sketch plus the correct version of the software, I have a feeling that my simulation is not working because i'm getting those two wrong. Could anyone give me correct links? I'm using arduino version 1.0.1.

Thanks
40  Using Arduino / Sensors / Re: Help needed with the MPU-6050. on: August 04, 2012, 04:52:50 am
Quote
The sketch compiles for a Duemilanove (both ATmega328 and ATmega168), but you have to update to the new Arduino 1.0.1 !

Oh okay. smiley
41  Using Arduino / Sensors / Re: Help needed with the MPU-6050. on: August 04, 2012, 04:46:31 am
I tried the i2c scanner and it was working fine. smiley
42  Using Arduino / Sensors / Re: Help needed with the MPU-6050. on: August 04, 2012, 04:45:45 am
As you told, i changed the f from the serialprint, but now a new error comes in this code.

Code:
  n = Wire.write(start);

error-
Quote
class Twowire has no member named write
43  Using Arduino / Sensors / Re: Help needed with the MPU-6050. on: August 04, 2012, 04:30:46 am
Thanks for your reply. smiley

I haven't changed any of the code, copy pasted the entire code. I'm using arduino 0022. Board- arduino duemilanove.
44  Using Arduino / Sensors / Help needed with the MPU-6050. on: August 04, 2012, 03:00:06 am
I recently purchased the MPU-6050 from ebay. I've always been skeptical about buying from ebay, and luckily they have a 14 day return policy, if it is damaged. So, i need to check its working asap. As i'm new to interfacing with i2c, i thought for the time being i'd use this code from http://arduino.cc/playground/Main/MPU-6050 to check if my component works. But it shows compile error "F was not declared in scope" (  Serial.println(F("InvenSense MPU-6050")); ) Could someone help me out? Thanks in advance.
45  Using Arduino / Installation & Troubleshooting / Re: IS MY ARDUINO DEAD! on: January 07, 2012, 09:46:31 am
@james you were probably right, the arduino actually works now. Thanks a lot for replying to this post. smiley
Pages: 1 2 [3] 4 5