|
1819
|
Using Arduino / Networking, Protocols, and Devices / Re: Serial Port Bluetooth Module flow control problem
|
on: October 16, 2012, 10:40:36 am
|
|
The module you linked to is just the Arduino side of the solution. What do you use on the PC side? Do you use a Laptop with integrated Bluetooth module? There is no need to use RTS/CTS but the sketch transfer to the Arduino relies on the DTR line (which resets the Arduino). The bluetooth connection doesn't support that line, so you have to push the reset button yourself shortly before you hit the send button in the IDE.
If you intended to have a completely remote process (without having to hit the reset button), you have to get a more elaborated solution which probably doesn't use a ultra cheap ebay bluetooth module.
|
|
|
|
|
1820
|
International / Deutsch / Re: Tiny85->Duemilanove->I2C brauche Denkanstoß!!!
|
on: October 16, 2012, 10:29:43 am
|
|
Ich erkläre es Dir anhand des Beispiel-Codes.
Der onReceive-Handler nimmt als Erstes die Register-Nummer entgegen. Das erste Byte, das geschrieben wird, ist also immer die Adresse des Registers. Werden mehr als ein Byte geschrieben, sind die restlichen Bytes Inhalt. Es wird also das nächste Byte gelesen, in das adressierte Register geschrieben und die Register-Adresse eins hochgezählt. Damit wird solange fortgefahren, bis alle übertragenen Bytes aufgebraucht sind (oder das Ende der Register erreicht ist).
Der onRequest-Handler nimmt den Inhalt des addressierten Registers (die Adresse wurde beim vorangegangenen onReceive-Aufruf gesetzt) und schreibt ihn auf den Bus. Danach wird die Register-Adresse hochgezählt, damit ein vielleicht gleich folgender Lese-Zugriff den Inhalt des nächsten Registers zurückliefert.
Ein Schreibzugriff besteht also in der Regel aus dem Übermitteln der Register-Adresse und dem Senden des Register-Inhalts, wobei "abgekürzt" werden kann, indem aufeinanderfolgende Register in einem Wische geschrieben werden. Ein Lesezugriff besteht in der Regel aus einen Schreibzugriff, der nur aus der Register-Adresse besteht und einem darauffolgenden Lesezugriff, in welchem der Slave den Inhalt dieses Registers rausschreibt. Auch hier können gleich mehrere aufeinanderfolgende Register auf einmal gelesen weden.
|
|
|
|
|
1821
|
International / Deutsch / Re: Tiny85->Duemilanove->I2C brauche Denkanstoß!!!
|
on: October 16, 2012, 09:39:43 am
|
Wenn ich nun einen Slave erstelle also meinen Tiny der wirklich nur den wert einer Variable übergeben soll. muss ich da mit registern arbeiten? bzw wie würde ich das überhaupt anstellen? Gibts da evtl ne gute Anleitung? Wenn Du nur genau ein Byte als Wert zurückliefern willst und auch für die Zukunft keine Erweiterungen geplant sind, dann kannst Du Dir die Register-Sache sparen. Allerdings ist der Aufwand nur sehr gering und wenn auch nur die Möglichkeit besteht, dass in Zukunft vielleicht noch ein anderes Byte übertragen werden könnte, dann würde ich jetzt schon ein simples Register-Modell implementieren. Eine Anleitung kenne ich nicht, das ganze ist auch sehr elementar. Der Master sendet die Register-Adresse, beim nächsten Read-Request wird der Inhalt des entsprechenden Registers retourniert. Was daran hast Du noch nicht verstanden, bzw. wo sind noch Unklarheiten?
|
|
|
|
|
1822
|
Using Arduino / Project Guidance / Re: Wrong Results!
|
on: October 16, 2012, 08:43:29 am
|
|
Show us the wiring and your code. If you use some libraries provide links to the ones you used. Which maxbotix sensor are you using?
And put your code into code tags, else it may get mangled by the forum system.
|
|
|
|
|
1823
|
International / Deutsch / Re: Arduino und Java?
|
on: October 16, 2012, 08:26:11 am
|
Ich wollte mal Fragen ob man die Arduinos mit Java programmieren kann. Nein, kann man nicht. Java ist für eine Plattform mit 2kB Hauptspeicher nicht geeignet, schon alleine die Speicherverwaltung (Garbage Collection) ist auf solchen Systemen absolut unbrauchbar.
|
|
|
|
|
1824
|
Using Arduino / Project Guidance / Re: How to take my Atmel328 Off Arduino Uno and into separate Circuit
|
on: October 16, 2012, 07:57:19 am
|
Can I just program the chip whilst it's in the Uno, then take the chip out, give the correct pins power, and have it work as it would if it was in the Uno? Yes, you can. Search on Google for "breadboard arduino". If you do it this way you need a few parts more than just power and the ATmega chip (crystal and some capacitors). Or do they leave the development board there? Most do, yes. The Arduino is not just meant as a development platform, in most cases it's the "production" platform as well. Experienced users may just develop on an Arduino and then, as soon as the project is doing what it should, produce a PCB and solder all the stuff on it. But this is the exception, the default is using the Arduino board for the whole project's lifetime.
|
|
|
|
|
1825
|
Using Arduino / Project Guidance / Re: Slightly lost with some RFID problems.
|
on: October 16, 2012, 05:09:30 am
|
|
You have an Arduino Pro Mini (which has one serial USART) and two serial devices (ID12 and BlueSmirf). How did you connect them?
BTW: the iPhone will never see the baud rate you use to communicate with the BlueSmirf, it sends Bluetooth packets the phone which simply has some HID content (hopefully) and no information about baud rates and the like.
|
|
|
|
|
1826
|
Using Arduino / Networking, Protocols, and Devices / Re: WiFi Shield with Phone Application
|
on: October 16, 2012, 04:56:11 am
|
|
In your post you talk about the "Arduino Wireless SD Shield", while the title says "WiFi Shield". The two are not the same. While the Arduino WiFi Shield is capable to connect to WiFi networks, the Arduino Wireless SD Shield is just a shield offering connections to an SD card and to an XBee module. Although you can connect WiFi capable XBee module (RN-XV, WiFi Bee or XBee S6 to name some examples) to that shield, the shield alone doesn't allow you to connect to a WiFi network.
|
|
|
|
|
1828
|
Using Arduino / Project Guidance / Re: USB HID OR Steering Wheel -> BlueTooth HID Bridge
|
on: October 16, 2012, 04:36:16 am
|
|
Interfacing to the USB bus as a host is a completely different thing than using a CAN bus interface. I'd start with that end of the problem and once solved try getting that into your Android.
I'd not use Bluetooth for that but the USB connector. Sure you have to supply power to your Android too but nobody is holding you back doing so on the same connector. This way you eliminate the problems inherent with a radio transmission (although it will seldom affect you because the distances are very short).
To be used as a USB HID device I'd recommend the Arduino Leonardo, it has USB support right in his main processor so you don't have to program two processors (as you would have to with an UNO) and fiddle with serial protocol stuff.
If you wanna stay with your Bluetooth HID solution you have to find a bluetooth module capable to do HID. Most cheap modules only support the serial profile so you have to take care not to choose the wrong one.
|
|
|
|
|
1830
|
International / Deutsch / Re: Kommunikation zwischen 2 "Arduinos"
|
on: October 15, 2012, 06:47:56 pm
|
Wenn ich die baud-Rate erhöhe wird manchmal der falsche RGB-Wert eingetragen oder das erste Pixel nicht ausgefüllt. Das wäre dann eben die fehlende Synchronisation. Der Arduino muss ja wissen, wo angefangen wird. Klar kannst Du einfach definieren, dass der Arduino warten muss und wenn der PC dann beginnt, Daten zu schicken, dann muss er einfach immer schön im Takt bleiben, aber solche ideale Zustände hast Du in der Praxis häufig nicht. Das ist genau der Grund, wieso ich den Trick mit den reservierten 255-Werten (0xFF) verwendet hätte. Den kannst Du schon vom PC aus verwenden. Du solltest wahrscheinlich Deinen ganzen Code posten, damit wir ihn mal durchsehen können. Die grundsätzliche Kommunikation mit dem PC sollte auch bei hohen Baudraten zu keinen Problemen führen, bis 57600 hatte ich nie Probleme. Deshalb vermute ich ein Problem in Deinem Sketch.
|
|
|
|
|