Defining BlueESC addresses

Good morning

It is the first time I am using an ESC so I am sorry if I ask too dumb questions. I have been trying to set a new address in a T200 with the BlueESC by following the steps in here: BlueESC Documentation .

Before starting assigning addresses I checked with my arduino that the 0x29 (default) is working fine so I can have a reference. Then I have been trying to set a new address in a T200 with the BlueESC by following the steps in here: BlueESC Documentation . For example using the arduino as an usb linker with avrdude I flashed the firmware with the id1.hex file (as far as I understood that is address 0x2A) but when I try to control it with the arduino again I can see in the terminal the ESC is not detected so I have two questions:

-I have been checking the github place GitHub - bluerobotics/BlueESC: Simple, open-source ESC that uses the SimonK firmware. . Do I need to have an initial firmware flashing? I heard somewhere that it is already flashed when ordered.

-The id on the hex files 0-15, do they mean 0=0x29, 1=0x2A etc until 0x38?

Thank you for your help

Hi Borja,

I’m sorry you’re having trouble with the I2C addresses! It sounds like you are doing everything correctly.

You are correct that the ids correspond to 0=0x29, 1=0x2A, etc.

Can you try the reprogrammed ESC with the original address (0x29)? Perhaps it is not changing correctly.

Best,

Rusty

Hi Rusty

I tried last Friday but it did not detect the address either. I might try to go through the initial firmware flashing again by tomorrow and try to assign the default address. Do you have any other suggestions?

Thank you for your fast reply!

Borja

Hi again!

It finally worked. I flashed the firmware by introducing the command in github:

avrdude -c stk500v2 -b 19200 -P [programmer port] -p m8 -U flash:w:bluesc.hex:i

and then the address with the command found in the BlueESC in the documentation:

avrdude -c stk500v2 -b 19200 -P [programmer port] -p m8 -U flash:w:blueesc_idXX.hex:i

Just something that I realized when trying the thrusters with the arduino code you provide with I2C. If you connect the power to the BlueESC before opening the terminal the thruster will go crazy. Open the terminal first and then power the BlueESC. That can help other people when playing with I2C.

Thank you anyway for your support

Borja

@Borja

Sorry to ask, but what you mean by opening the terminal? On our side (T100 with BlueESC), we put the ESC’s PWM pin to the ground to avoid the behaviour you described (thruster going crazy).

About not being able to address the T100 with the new firmware: same issue. I could not work on our project for the last 4 weeks (was out of town). But back then, I also could not detect / communicate with the BlueESC after flashing it with the new firmware. I’ll try and check again on/before this week end. Your feedback may well be very useful :slight_smile:

However, where did you find that blueesc.hex file? As I understand, the blueesc_idXX.hex files already contain everything needed. The Makefile seems to confirm my understanding. It’s really surprising that doing this “double programming” may solve that problem.

JL

Hi JL Picard

I actually realized that later on. The flashing command before flashing the addresses wasn’t doing anything but I did not notice it until some days ago. Now I can assign the addresses with the second command. As you said, if I put the PWM signal to ground the thrusters initialize correctly and I don’t get any crazy behavior.

I am using an arduino and in the example provided in the BlueESC documentation you can open a terminal to check the thrusters data. Now that everything works fine I think that the terminal opening before powering them up does not make any difference. It shouldn’t be a problem to power them on before.

I guess I was getting the addresses right but since I didn’t connect the pwm signal to ground it was going crazy. If you try to assign addresses with avrdude and then connect the pwm signal to ground when you try the I2C communication it should work. Otherwise you are always welcome to ask and I can try to help you :smiley: