:thumbs1: Danke für die schnellen Antworten. Ich hab mir nun den Bausatz bestellt und werde dann hier auch Rückmeldung geben, ob alles Funktioniert. Die Idee mit dem Levelshifter (evtl. mit einem MCP23017) gefällt mir zwar noch ein bisschen besser, finde mich aber in den Datenblättern nicht so gut zurecht, dass ich mir ne gute Schaltung aufbauen könnte.
Posts by James_Dean
-
-
Hallo Miteinander,
ich habe ein kleines Programm geschrieben, das über eine Abfrage verschiedener der GPIO's Emails verschicken kann. Klappt mit Buttons soweit ganz gut. Nun würde ich gerne eine 5V-24V Steuerspannung einlesen. Habe mir zuerst überlegt, das ganze mit Relais und einem PCF8574 (zu Porterweiterung) zu realisieren. Kam mir allerdings nicht wirklich elegant vor. Bin dann auf das Ebayangebot gestoßen. Würde das mit dem Raspberry Pi (Model B Rev2) über den I2C Bus funktionieren? Gibt ja ab und zu Probleme mit 3.3V und 5V. Ich kenn mich leider mit Elektronik nicht gut aus. Datenblatt und Schaltplan sind beim Ebayartikel dabei. Wär nett wenn hier jemand kurz drüber schaun könnte. Oder vielleicht auch ne bessere Idee hat. :thumbs1:
http://www.ebay.de/itm/Bausatz-I2…=item2581ec215d
Gruß James
-
Hilfee...ich bekomme immer den Fehler: "Failed to write reg: Input....." .
Ich hab ja das model A und darum in der Datei I2Cdev.cpp überall bei "/dev/i2cdev-0" die Null durch eine Eins ersetzt.
Wenn ich "$i2cdetect -y 1" eingebe, wird mein MPU als 69 angezeigt.
Hat vielleicht jemand ne Idee, woran das liegen könnte ?Gruß James
Fehler beim Ausführen von demo_dmp:
Code
Display Morepi@raspberrypi /media/usbstick/MPU6050-Pi-Demo $ sudo ./demo_dmp Initializing I2C devices... Failed to write reg: Input/output error Failed to write device(-1): Input/output error Failed to write reg: Input/output error Failed to write device(-1): Input/output error Failed to write reg: Input/output error Failed to write device(-1): Input/output error Failed to write reg: Input/output error Failed to write device(-1): Input/output error Testing device connections... Failed to write reg: Input/output error MPU6050 connection failed Initializing DMP... Failed to write reg: Input/output error Failed to write device(-1): Input/output error Failed to write reg: Input/output error Failed to write device(-1): Input/output error Failed to write device(-1): Input/output error Failed to write device(-1): Input/output error Failed to write reg: Input/output error Failed to write device(-1): Input/output error Failed to write reg: Input/output error Failed to write reg: Input/output error Failed to write reg: Input/output error Failed to write reg: Input/output error Failed to write device(-1): Input/output error Failed to write reg: Input/output error Failed to write device(-1): Input/output error Failed to write device(-1): Input/output error Failed to write reg: Input/output error Failed to write device(-1): Input/output error Failed to write device(-1): Input/output error Failed to write device(-1): Input/output error Failed to write device(-1): Input/output error Failed to write device(-1): Input/output error Failed to write device(-1): Input/output error Failed to write reg: Input/output error DMP Initialization failed (code 1)Code der I2Cdev.cpp Datei:
Code
Display Moreint8_t I2Cdev::readBytes(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint8_t *data, uint16_t timeout) { int8_t count = 0; int fd = open("/dev/i2c-0", O_RDWR); if (fd < 0) { fprintf(stderr, "Failed to open device: %s\n", strerror(errno)); return(-1); } if (ioctl(fd, I2C_SLAVE, devAddr) < 0) { fprintf(stderr, "Failed to select device: %s\n", strerror(errno)); close(fd); return(-1); } if (write(fd, ®Addr, 1) != 1) { fprintf(stderr, "Failed to write reg: %s\n", strerror(errno)); close(fd); return(-1); } -
Hi Kurt,
danke für die schnelle Antwort. Werd ich morgen gleich ausprobieren.
Hast du vielleicht auch etwas im Zusammenhang mit Python und dem smbus Modul oder
etwas in der Art gemacht/gefunden?
Bin jetzt schon n paar Stunden auf der suche und hab nichts brauchbares gefunden.
Der MPU scheint eher bei den Arduinousern beliebt zu sein
Gruß James
-
Hey Kurt,
gibts darüber irgendwo nen kurzen Bericht, wie genau du den MPU6050 eingerichtet hast und wie man die Bildschirausgabe verwirklicht?
Hört sich ziemlich interessant an. Leider kenn ich mich mit dem I2C-Bus noch nicht so gut aus.Gruß James