Arduino ESC control using buttons


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?


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.


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:


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


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