Arduino ESC control using buttons


#1

So I am making an underwater scooter, no big deal with the hardware, however I struggling with the Arduino code for the ESC control.I want to have 3 buttons each having a different speed.
So far I have made this but I keep getting an: expected unqualified - id before ‘{’ token.
here is the code ,could anyone help?


#2

Dear Makt,

the error will appeared because you close the viod loop bracket and continue with a code, you have a issue with bracket,
can you sent your code to change some bracket wish make the error.


#3

Yeah, followed, the Arduino compiled it ( screenshot wasn’t big enough)


Is the code going to work now, with the ESC?
Thanks, appreciate it! :slight_smile:


#4

you should try it ,
can you told me what your project are??


#5

Yeah, your project should work now that you fixed the error. Keep us updated.