Show Posts
Pages: 1 2 [3] 4 5 ... 343
31  Using Arduino / Networking, Protocols, and Devices / Re: BC127 Software Serial not reading on: June 13, 2014, 04:31:47 am
I have my RX and TX pins on the arduino crossed to the RX and TX pins on the BC127.

According to the schematics of the breakout board RX from the board should be connected to RX on the Arduino and the TX pins identically.

However when I call btSerial.available() I can't get the serial connection to be available.

The available() method returns the number of bytes waiting in the receive buffer for you to be read. It says nothing about the availability of the connection itself (that's not possible with a asynchronous serial connection).

My final goal is to get the music metadata from the bluetooth connection, but I can't get any data from the serial connection first.

What do you intend to do with that information? Is using the hardware serial interface an option (SoftwareSerial is a last resort solution not intended to be a drop-in replacement for the hardware)?
32  Using Arduino / Sensors / Re: Pressure Sensor - MS5611 Barometer problem on: June 12, 2014, 11:05:42 am
No link to the used libraries, no link to the used hardware. Did you read the sticky note at the top of the forum?
33  Using Arduino / Networking, Protocols, and Devices / Re: Remote Control - Semi-Autonomous on: June 12, 2014, 11:03:44 am
   >> Motor Shield - (digital: 3,5,6,11)  // defined in library source code, 'AFMotor.cpp'

If you're using the AFMotor library from AdaFruit (you forgot the link to the used hardware!), the pins used are 4, 7, 8 and 12, so I would expect pin 4 (motor latch) to be activated from time to time during operation.

Provide schematics of your setup and links to all used hardware.
34  Topics / Device Hacking / Re: Controlling Automower on: June 12, 2014, 10:56:02 am
I can read the Sensors so the issue might be in the Automower side.

Why do you want to restart the Arduino then? What do you expect that this should fix?
35  International / Deutsch / Re: Ardino DUE Pin-Change Interrupts on: June 12, 2014, 10:53:46 am
Mit der PINCHANGE Library hier:
Müsste es eigentlich auch funktionieren jedoch bekomm ich die examples nicht zum laufen....kommt immer new.h wurde nicht gefunden..

Die ist nur für ATmega-Arduinos, für den Due kannst Du die nicht gebrauchen.

Hatte ich mir auch überlegt...das Problem ist aber das je nachdem was für ein Config-File per USB Stick geladen wird die PINS unterschiedliche Funktionen haben. Zudem wenn ich 100 Inputs 1 Funktion pro Pin?

Der Due hat 54 Eingänge und die Definition der Funktionen kannst Du ja per Makro machen, dann dürfte das halbwegs übersichtlich sein. Die Funktionsverteilung per Jump-Table geht dann auch gleich im selben Aufwasch und Du kannst bequem die Einträge der Jump-Table (Funktionspointer) aus Deiner Konfigurationsdatei machen.
36  Topics / Device Hacking / Re: Controlling Automower on: June 12, 2014, 08:06:10 am

if (strcmp (buffer, "digital") == 0)


if (strcmp ((char *)buffer, "digital") == 0)

and it compiles for me.

Problem happens if Automower has low battery. So I have to restart Arduino because it is probably not an issue of the code. How can I do this?

What happens if the mower is low on battery? Does the voltage that powers the Arduino drop? How much voltage do you have with a full battery? How much if it's getting empty? Where do you feed the Arduino with this voltage (Vin, 5V, power connector)?

You can restart the Arduino by pushing the reset button. You probably meant how to do it in software: that doesn't make sense because your software is already not running correctly, so don't expect it to reset itself.
37  International / Deutsch / Re: Ardino DUE Pin-Change Interrupts on: June 11, 2014, 09:20:20 am
Eine separate Funktion per Pin, die danach den eigentlichen Handler mit der Pin-Nummer aufruft?
38  Using Arduino / Project Guidance / Re: Looking for advice with an OBDuino project. on: June 11, 2014, 09:15:07 am
Can I wire it directly to the arduino board?

You can but you shouldn't because it runs on 12V and that would destroy your Arduino.

Or do you absolutely need an interface like the ELM to get it to work?

No, you can do that interface yourself but a chip like the STN1110 is much easier and way cheaper than doing it yourself.
39  Using Arduino / Networking, Protocols, and Devices / Re: Timing issues reading data from sensors using I2C on: June 11, 2014, 09:10:17 am
Usually the sensor returns the value sampled at the time the read command was received. You then have to read the whole data out. Assuming that the acceleration values are 16bit integers the transfer time (for only one sensor) is a bit more than 50 clock cycles or about half a millisecond (both sensors need a bit more than a millisecond). How often do you want to read the data from the IMU (as fast as possible doesn't make sense in your case)?

If you want to get the best possible throughput don't calculate the float values on the Arduino but transfer the raw data to the PC and make the calculations there.

The baud rate you use between the Arduino and the PC is relevant if you want to transfer the data in a non-binary format (because you transfer much more data than you receive on the I2C, so if you want to keep a high update frequency you may run into problems).

Additionally, the data points in any given set must be recorded at the same time.

At the same time is not possible, define how much delay is acceptable by your application. What kind of movement are you measuring?
40  International / Deutsch / Re: SPI-Schnittstelle in ISR nutzen? on: June 10, 2014, 11:54:44 am
Den Delay kannst Du Dir sparen, die Hardware benötigt ihn nicht (allenfalls der Slave, aber wenn Du die Initialisierung in den setup() legst, sollte selbst das hinfällig sein). delayMicroseconds() würde zwar im Interrupt-Handler funktionieren, aber 10'000µs in einem Interrupt-Handler zu warten, grenzt schon fast an ein Verbrechen :-). Die Interrupt-Routinen sollten so kompakt und schnell wie möglich programmiert sein, sonst wirst Du ganz schnell viele unerwartete Nebeneffekte kriegen.
41  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Uno with Ethernet Shield: query_time: could not connect to server on: June 10, 2014, 11:49:28 am
What sketch are you using? What program runs on the Mac (if any)? What does "connected through my Mac" means? Does it translate between Ethernet and WiFi, Internet and USB (Serial) or any other kind of media conversion?

What can i do ?

Provide more information!
42  Using Arduino / Networking, Protocols, and Devices / Re: Cant manage to communicate between two arduinos over wireless serial on: June 06, 2014, 07:16:33 am
I didnt program the arduinos with a certain sketch since i assumed that it disent matter and if hardware serial recives data it will print it on terminal no matter what

That's not correct. The "terminal" (I guess you call the Serial Monitor of the IDE so) displays what the Arduino prints out to it's hardware serial interface. Most Arduinos only have one hardware serial interface and that one is connected the PC by a USB converter. Depending on how you connected the module to the Arduino you either can see it's output on the Serial Monitor or the Arduino can see it but not both at the same time.
Please provide a link to the hardware you bought and post a wiring diagram of how you wired the module to the Arduino.
43  Using Arduino / Networking, Protocols, and Devices / Re: Timing issues reading data from sensors using I2C on: June 06, 2014, 07:11:07 am
My understanding is that to pull data from a sensor I2C has to go through the following procedure:

Send start bit (1 bit)
Send slave address (7 bits)
Send write bit ( 1 bit)
receive acknowledge bit (1 bit)
Send sub address (7 bits)
receive acknowledge bit (1 bit)
send start bit (1 bit)
send slave address (7 bits)
send read bit (1 bit)
receive acknowledge bit (1 bit)
receive data (8 bits)
receive acknowledge bit (1 bit)
receive data (8 bits)
receive acknowledge bit( 1 bit)
send stop bit (1 bit)

I2C doesn't have a start bit but a start condition. Your "subaddress" (this is usually called a register index or register address) is also 8 bits on most I2C sensors.
After receiving a byte you have to send the acknowledge bit, you don't receive it. You stop that transfer by sending a NAK instead of a ACK, it's not fixed to receive 2 bytes.

That's 47 bits to read 1 value or 282 bits to read all 6.  If I want to do that 100 times a second, that's 28,200 bits per second which is a lot higher than the 9600 baud rate used in arduino.

On I2C you don't call the frequency baud rate but just clock frequency and usually it's fixed to be either 100kHz or 400kHz.

I've heard about something in I2C called clock stretching.  I don't fully understand it, but I don't want it to mess up the spacing between readings.

Clock stretching is used by the slave if the master is clocking too fast or if the slave needs some time until it's got the requested value.

I want to make sure that the 3rd group of readings all come from 0.3 seconds after I started and that the next group will come from 0.4 seconds after, and the next 0.5 and so forth.

What for?

When the arduino code reads values from the IMU, it's looking in a buffer, right?

No, the Arduino gets the values from the IMU and stores it in a buffer locally (that's what requestFrom() is doing) and you read it from there (with the read() call).

The values it is reading have already been sampled by the IMU?  Is the sample rate of the ensors critical to ensuring that I get evenly spaced readings?

That depends on the sensor. Which one of the two your IMU has do you talk about here?
44  Using Arduino / Networking, Protocols, and Devices / Re: No-library single-byte serial transmit? on: June 05, 2014, 11:45:41 am
The SoftwareSerial class blocks all interrupts on the Arduino while receiving or sending a byte. The class is only able to receive data on one instance at a time, so you have to know when data arrives on the different instances or you loose data. With SoftwareSerial you will always have this kind of problems, you may be able to lower them a bit but in the end you'll never get a reliable system.
I'd suggest to use a Teensy 3.x which offers you 3 independent hardware UARTs (the ones from Teensy 3.1 should be even 5V tolerant) and you can program them also with the Arduino IDE. Also they are about the same size as the Arduinos you're using.
45  International / Deutsch / Re: Google Protocoll Buffers zur Kommunikation zwischen Flash-Anwendung und Arduino on: June 05, 2014, 08:44:07 am
kann mir jemand helfen wie ich eine sichere und stabile kommunikation realisieren kann?

Welche Information muss übertragen werden?

Wenn es um 10 RGB LEDs geht, dann kannst Du ja einfach 60 Zeichen übertragen (Hex-Form der RGB-Daten) mit Start- und Stop-Zeichen. Damit kriegst Du fast 200 Hz hin, was weit mehr ist als das menschliche Auge wahrnehmen kann.
Pages: 1 2 [3] 4 5 ... 343