Show Posts
Pages: [1] 2
1  Using Arduino / Programming Questions / Re: Unreliable serial communications with Uno on: October 01, 2013, 02:56:14 am
I don't have anything connected to pins 1 or 2. Somebody else suggested that it might be interference from the 2A stepper motor I am using... I am going to try lowering the baud rate a bit and shielding the stepper wires to see if that helps.
2  Using Arduino / Programming Questions / Re: Unreliable serial communications with Leonardo. on: September 30, 2013, 09:34:37 am
Apologies, I actually have an Uno! That makes slightly more sense, but I'm still not sure how it can be sending and receiving when no host serial app is running...
3  Using Arduino / Programming Questions / Unreliable serial communications with Leonardo. on: September 30, 2013, 08:39:23 am
Hi,

I have a Leonardo that is programmed to send data at 115200 baud via serial to a desktop app (written in C++). Most of the time it works fine, however occasionally it gets into a very strange state. The actual program only sends data every 100 ms so in normal operation the tx light flashes and the rx light is off.

Occasionally the tx and sometimes rx lights will become solid as if it is sending lots of data, but my desktop program never receives any. Nor does putty or the Arduino serial monitor. Very strangely, resetting the Arduino does nothing but sometimes simply opening the Arduino serial monitor (which also resets the Arduino) fixes it. I have even a few times had it so that the tx and rx lights are on solid even though no serial program is open on my computer! Surely that should be impossible? At other times the tx and rx lights never come on at all, even though I'm 95% sure my program is sending data.

I should note that this behaviour is stochastic.

Does anyone have any idea what could be causing this weirdness? I suspect maybe it is some issue with buffering or something? Is there a way to check the state of the tx buffer on the Arduino?
4  Using Arduino / Sensors / Re: Sparkfun 9 DoF sensor stick problems. on: July 26, 2011, 12:19:47 pm
Yes it does. I have since connected it to a bus pirate, and it shows the two other chips (gyro and magnetometer) responding, but the accelerometer was not. So definitely a faulty part.

I emailed cool components and they said they would send me a replacement.
5  Using Arduino / Sensors / Re: Sparkfun 9 DoF sensor stick problems. on: July 12, 2011, 09:03:36 am
That is slightly reassuring. I'm using the RBBB (Really Bare-Bones Board) arduino. Here is a photo:



I really appreciate the help btw.
6  Using Arduino / Sensors / Re: Sparkfun 9 DoF sensor stick problems. on: July 11, 2011, 11:20:08 am
Also, I hooked it up to an oscilloscope. It seems like the address is sent, but the ACK bit isn't set by the ADXL345. Also note that it is 3.3V (vertical division is 2V).

7  Using Arduino / Sensors / Re: IMU 5 DOF on: July 11, 2011, 09:44:58 am
Search for FreeIMU, and also don't make the mistake of connecting it to the arduino without disabling its internal pull-up resistors like I did, or you might fry the chips.
8  Using Arduino / Sensors / Re: Sparkfun 9 DoF sensor stick problems. on: July 11, 2011, 09:39:05 am
Thanks for the replies. Fabio, what makes you think they aren't dead, given that I connected them to the 5V pull-ups and the datasheet for the ADXL345 says SDA and SCL can't go above Vdd (3.3V) plus a tiny bit? And if they aren't dead, then I can't see why my code didn't work with the internal 5V pull-ups disabled (it seems the schematic shows 3.3V pull-ups built into the sensor board).
9  Using Arduino / Sensors / Re: Sparkfun 9 DoF sensor stick problems. on: July 11, 2011, 05:54:15 am
Dammit. So basically all I had to do was modify twi.cpp so it didn't use the 5V pull-ups, and it would have been fine, but now the chips are dead?

It seems pretty damn stupid that they'd have a voltage regulator so you can run Vcc off 5V, but then not even tell you that you'll damage it if you connect it straight to the 5V arduino. And whoever wrote twi.cpp deserves some significant blame too... Code shouldn't break hardware by default.
10  Using Arduino / Sensors / Re: Sparkfun 9 DoF sensor stick problems. on: July 10, 2011, 06:30:39 pm
I thought you had to disable those... or do I need to disable the internal ones and add external ones to 3.3V? I don't even have a 3.3V source. :-/ And also if I previously ran it with the internal pull-ups enabled, will that have damaged the devices? If so that is pretty -ing annoying given that there is no warning about this anywhere on sparkfun, or the wire library, and that *really* shouldn't be the default.

Is there any way to bodge a 3.3V source, perhaps using a voltage divider? I'm not concerned about power usage.
11  Using Arduino / Sensors / Sparkfun 9 DoF sensor stick problems. on: July 10, 2011, 06:45:12 am
Hi, I bought one of these: http://www.sparkfun.com/products/10183
which has an ADXL345 accelerometer that I am trying to communicate with over I2C. I wired it up to an Arduino like this:

+5V -> Vcc
0V -> Gnd
A4 -> SDA
A5 -> SCL

And my code so far is:

Code:
#include <Wire.h>

const int ACCEL_ADDRESS = 0x1D;
const int ACCEL_POWER_CTL = 0x2D;
const int ACCEL_DATAX0 = 0x32;
const int ACCEL_DATAX1 = 0x33;
const int ACCEL_DATAY0 = 0x34;
const int ACCEL_DATAY1 = 0x35;
const int ACCEL_DATAZ0 = 0x36;
const int ACCEL_DATAZ1 = 0x37;

const int MAGNO_ADDRESS = 0x1E;

const int GYRO_ADDRESS = 0x38;

void setup()
{
  Serial.begin(9600);
 
  Serial.println("Starting I2C.");
  Wire.begin();
  Serial.println("I2C started. Starting accelerometer.");
  Wire.beginTransmission(ACCEL_ADDRESS);
  Wire.send(ACCEL_POWER_CTL);
  Wire.send(0x08);
  Wire.endTransmission();
  Serial.println("Accelerometer starter. Looping.");
}


void loop()
{
  // X accel.
  Wire.beginTransmission(ACCEL_ADDRESS);
  Wire.send(ACCEL_POWER_CTL);
  Wire.endTransmission();
  Wire.requestFrom(ACCEL_ADDRESS, 1);
  while (!Wire.available());
  int highx = Wire.receive();
  Wire.beginTransmission(ACCEL_ADDRESS);
  Wire.send(ACCEL_DATAX1);
  Wire.endTransmission();
  Wire.requestFrom(ACCEL_ADDRESS, 1);
  while (!Wire.available());
  int lowx = Wire.receive();
  Serial.println((highx << 8) | lowx);
}

But I don't get any response from the device (it never gets past the first Wire.available() loop). Can anyone say what I am doing wrong? I read some mention of disabling pull-up resistors in twi.cpp which I also tried, but it made no difference, and I've also tried the driver from the FreeIMU library which didn't work either.

This is very annoying, especially as it cost about £60. Have I got a dud board? Any ideas?

12  Forum 2005-2010 (read only) / Development / Qt Creator on: December 20, 2008, 11:32:56 am
Hi,

With the recent release of the Qt Creator source code (GPL) I though it would be awesome if someone (possibly me) could create an arduino version of it.

Don't take this the wrong way, but the text editor in the current IDE is shit. It also doesn't have awesome features like code completion and ... even anti-aliased text!

The Qt Creator IDE in contrast is simple, looks good and doesn't have too many features that would be overkill for arduino.

What do you think?
13  Forum 2005-2010 (read only) / Development / Re: Pins for arduino shields. on: December 04, 2008, 05:27:16 am
Ah misread - I was looking at the drawings (which have short pins) rather than the data sheets.

So presumably what I want is one of these:

http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=SAM1125-32-ND

and select the SSA-132-W-T item number (and then I can cut the 32 pin up into four 8 pin headers).

£2 seems like a lot... Guess you don't need them much...
14  Forum 2005-2010 (read only) / Development / Re: Pins for arduino shields. on: December 04, 2008, 05:17:25 am
Thanks for the replies. The one I want is the one on adafruit, but I don't live in America and really don't feel like paying international shipping (&waiting) for a $2 item!

Anyone know where I can get them in the UK? Tried searching digikey again but it doesn't have the leg height as a field, which makes it impossible to search...
15  Forum 2005-2010 (read only) / Development / Re: Pins for arduino shields. on: December 03, 2008, 06:00:19 pm
This is the image:



By the way, not only is this a stupid way of preventing spam, but the 'post' and 'preview' buttons become broken after you click them. This is really annoying because you do something like:

1. Write message
2. Be told you can't have links.
3. Go back to edit the post.
4. Try to click post - it doesn't work anymore. You now have to copy the text and go to the 'Create new topic' again.

Grr stupid forum software.
Pages: [1] 2