arduino-wch32v003 icon indicating copy to clipboard operation
arduino-wch32v003 copied to clipboard

digitalWrite error

Open suprimex opened this issue 1 year ago • 3 comments

simple code like: unsigned ledState = HIGH; digitalWrite(ledPin, ledState);

causes error: invalid conversion from 'unsigned int' to 'PinStatus' [-fpermissive]

suprimex avatar Sep 24 '24 11:09 suprimex

Looks like this project dead, unfortunately :(

suprimex avatar Oct 07 '24 23:10 suprimex

Hi, I just don't have the time right now to maintain it. I want to continue it in the future but currently I am busy.

You need to use the data type PinStatus I think it was instead of unsigned int for LOW/HIGH. I think in default Arduino it is a bit different where it uses a number, but I haven't got the opportunity to make it compatible for both.

AlexanderMandera avatar Oct 08 '24 13:10 AlexanderMandera

You wrote unsigned ledState = HIGH; you must write usigned int ledState = HIGH; or like @AlexanderMandera wrote PinStatus ledState = HIGH;

doesn´t the same!!

NOTE: I didn´t test it.

Surbyte avatar Dec 11 '24 17:12 Surbyte