Home        Store        Docs        Blog

Afro ESC's, t100 thrusters, Raspberry pi 3


(morgan) #1

I am using a Raspberry Pi 3, Afro ESC’s, and t100 thrusters. I am a beginner. I am trying to connect the t100 thrusters to my raspberry pi 3. I have the correct physical set up, but i am having a hard time with the python code to make the t100 thrusters power on and perform.


(Jacob) #2

Ok @morganursel, do you need help? Can you share your code or let us know what’s wrong?


(morgan) #3

I need help with python codes to turn on Blue robotics t100 variable speed thrusters connected to a raspberry pi 3.


(Jacob) #4

Ok, what does your physical setup look like?


(morgan) #5

we are using raspberry pi 3 to connect two t100 thrusters through gpio pins to afro esc’s. we are using dc batteries for the power source. we are having issues finding a python code to control both thrusters together. we want the thrusters to move in forward, reverse, left and right. we also want to control them independently.


(Jacob) #6

Ok, the ESCs require a special kind of signal called PWM (it is controlled exactly the same way as servos). Please research how PWM and servo/esc controls work, then you may find that the pigpio library will help you write a program to control the ESCs.


(morgan) #7

i am aware that the gpio pins are for the input/ouput. I am a beginner I do not understand. i need a code in python to reference to control t100 thrusters with afro escs.


(Jacob) #8

Please research how PWM works to control ESCs and servos using google. There are very many examples of how to control ESCs and servos (they use the same code) using pigpio on the Raspberry Pi. Blue Robotics does not have any example code for your hardware configuration.


(morgan) #10

this is the code that i am using. it does not power the thrusters.

Servo Control

import time
import wiringpi

use ‘GPIO naming’

wiringpi.wiringPiSetupGpio()

set #18 to be a PWM output

wiringpi.pinMode(18, wiringpi.GPIO.PWM_OUTPUT)

set the PWM mode to milliseconds stype

wiringpi.pwmSetMode(wiringpi.GPIO.PWM_MODE_MS)

divide down clock

wiringpi.pwmSetClock(192)
wiringpi.pwmSetRange(2000)

delay_period = 0.01

while True:
for pulse in range(50, 250, 1):
wiringpi.pwmWrite(18, pulse)
time.sleep(delay_period)
for pulse in range(250, 50, -1):
wiringpi.pwmWrite(18, pulse)
time.sleep(delay_period)


(Rusty) #11

Hi Morgan,

Please see my response here: Rasbperry pi 3 and t100 thrusters

-Rusty