MikroKopter - Forum » Newbie - Bereich » BL-Ctrl V1.X with Raspberry Pi 3?

BL-Ctrl V1.X with Raspberry Pi 3?

Neues Thema Antwort

Seite: 1

Autor Neuer Beitrag
Mitglied
Registriert seit: Nov 2016
Beiträge: 3
Ort: Zürich
Hello,

I have some BL-Ctrl laying around, I guess V1.1 or V1.2, and I would like to control them by a Pi 3.

I was able to control an I2C Adafruit 16-PWM-Module using Python and this software:
https://github.com/adafruit/Adafruit_Python_PCA9685

Question:
- can I control the BL-Ctrl similarly? How, could you give some initial hints?
- similar to http://wiki.mikrokopter.de/BlCtrlProtocol?
- are there C/C++ code or examples?


thanks for suggestions and hints.
tani
Mitglied
Registriert seit: Jan 2012
Beiträge: 3411
Ort: Dachau
For sure,

use Servo Control and the PWM Input
Mitglied
Registriert seit: Nov 2016
Beiträge: 3
Ort: Zürich
Hi copter 4 you,

yes, im aware of this possibility. but i think i2c enables faster control - it's also to educate myself :)
Mitglied
Registriert seit: Jun 2013
Beiträge: 1261
Ort: Luxembourg
tani meinte
yes, im aware of this possibility. but i think i2c enables faster control - it's also to educate myself :)

Indeed you should use I2C for control of MK BL-Motor-Ctrls. Using servo PWM would be a complicated work-around with no benefit.

In the bottom of the page you linked to, there is a link to forum post with Arduino code for I2C control. You should be able to rewrite that for the single I2C port of Raspberry Pi.
Mitglied
Registriert seit: May 2013
Beiträge: 159
Ort: Würzburg, Bayern
Keep us updated, please :)
Worked on a simple motor testing unit with an Arduino and one BL-Ctrl 2.0 connected via PWM. Works o.k. but I2C would be better...
Mitglied
Registriert seit: Nov 2016
Beiträge: 3
Ort: Zürich
I´m working on it. I managed to get the motor rotate using wiringPiI2C.h. However, it only spins immediately after sending a wiringPiI2CWriteReg16() command, and idles down right after that. so what you see is a very bumpy and stuttery motion....

more soon.

Neues Thema Antwort

Seite: 1

MikroKopter - Forum » Newbie - Bereich » BL-Ctrl V1.X with Raspberry Pi 3?