Hi Guys,
I have downloaded Visual Studio Code and set it up on my Windows machine.
I have copied Bills test codes from the DB1 GitHub pages and saved them using PIO.
they are all showing errors!
"comparison between signed and unsigned integer expressions"
"not declared" is another, the variable is declared at the bottom of the code.
Does anyone else have the same issue or am I doing something wrong here?
regards,
Mel.
I recently setup vscode with PlatformIO following the directions in the Dronebot Workshop Youtube video. To test the code related to the video I did the following and all seemed to work ok. I use Windows 10.
1. Downloaded the zip file "PlatformIO+-+DronBot+Workshop.zip" using the url dbot.ws/piocode.
2. Extracted files. I put them in user folder "Documents/PlatformIO/PlatformIO+-+DronBot+Workshop"
3. Opened vscode and did File->Open Folder ... From file selection dialog selected folder of the test code (i.e. "Arduino Blink Test")
4. Opened src/main.cpp in Explorer pane
I did have an issue when I tried almost any thing in PIO with Windows 10 blocking programs access to files in the Documents folder. Problem was related to "Controlled folder access" feature. You can turn this feature off or allow specific apps though. I decide to use allow function - I added programs as I found them (something failed - I checked what program was blocked and then added it.)
Not sure this helps. If you post more specifics on what you tried I can see if I can help you.
When you're retired, every day is Saturday.
@vieuxgeek Without having the exact code you are trying to compile, it ia almost impossible for anyone to help you. Perhaps you could but the link drop the link you are trying to compile here and someone could give you a better answer. My guess is both errors are correct. You should never compare unlike types. Either make them both sighed or both unsigned. In both 'C' and 'C++', variables must be declared PRIOR to use. Arduino IDE lets you get away with it but it is not good coding practice. Try moving the variable declaration to the top of the file but below any includes.
thanks guys, yes the code runs in the Arduino IDE, so iy seems its the problem you specified.