This is my first attempt of compiling something in the Arduino environment, so a lot of obvious things aren't that obvious to me.
So after hopefully installing all the right libraries, I get a lot of errors of the kind shown below:
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp: In member function 'void Adafruit_CircuitPlayground::playTone(uint16_t, uint16_t, bool)':
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:238:3: error: 'PLLFRQ' was not declared in this scope
PLLFRQ = (PLLFRQ & 0xCF) | 0x30; // Route PLL to async clk
^~~~~~
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:238:3: note: suggested alternative: 'PCIFR'
PLLFRQ = (PLLFRQ & 0xCF) | 0x30; // Route PLL to async clk
^~~~~~
PCIFR
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:239:3: error: 'TCCR4A' was not declared in this scope
TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on
^~~~~~
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:239:3: note: suggested alternative: 'TCCR0A'
TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on
^~~~~~
TCCR0A
In file included from c:\program files\windowsapps\arduinollc.arduinoide_1.8.55.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\io.h:99:0,
from c:\program files\windowsapps\arduinollc.arduinoide_1.8.55.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\pgmspace.h:90,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/Arduino.h:28,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground/utility/Adafruit_CPlay_LIS3DH.h:30,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h:21,
from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:30:
...
...
exit status 1
Error compiling for board Arduino Uno.
Any ideas would be highly appreciated.
Cheers,
-max
Yes, you could try the "m" command.
m index angle
for example,
m8 -10
m12 30
Make sure you set the serial monitor as "no line ending" and baudrate 115200 before entering "y" for the WriteInstinct.ino for correct parsing.
Thanks, I finally got it working. Re-did all the calibration steps and then everything started to work.
Now I'll have to understand better on how I can add my own 'tricks' to it.
Thanks for all the patient help
But that's what I did. Calibrate the servos without the legs on, the attach the legs as square as possible. But as soon as I switch the board on, hold the dog in the air and press a button on the remote (no idea really which one I should or should not) and the thing goes berserk. Unfortunately, I'm not learning anything here as I have no idea what I'm actually doing or trying to do. It's all a black box at this point.
Is there a command where I could at least instruct a particular servo to rotate by some amount? This way I at least would be able to check if I wired up everything correctly.
It would also help to know what all the different buttons on the remote are for. Is there a diagram/picture I can find?
I then attached the legs and set them to the angle as an indication.
These steps are done in the wrong order. You need to connect the servos to the board, send the calibration signal to make them to calibration position, then attach the legs.
The logic behind the calibration process.
You are getting close to a complete setup. Every time you find something that doesn't work up to your expectation, you learn something new and deeper to nature.
I'm close to giving up here. I uploaded the code, ran the calibration step, including the servo calibration. i then attached the legs and set them to the angle as indication. But then when I switched it on and pressed a button on the remote control (there is no '1' button on my remote control) the servos go berserk, they very quickly move around, the front leg ripped off the head and fortunately I could switch off power quickly.
I have no idea what I'm doing here, flying completely blind. Really frustrating.
Any idea how I can troubleshoot this.
Are you using the latest one - 1.8.19?
"The “strange connector” is the regular USB to micro-USB cable, which has been popular for the past ten years. '
Sorry, hadn't seen one in a few years - and definitely no micro-US to usb-c.
But you may want to confirm that the newest versions of the IDE distributed through the Microsoft Store (recommended install option) creates the same errors as I have seen. It also appears that it no longer accepts the I2C library's zip/directory structure. I needed (same on the Mac) to copy the two directories from 'unrolled' zip file into the 'libraries' directory.
Now I'm waiting for the battery to charge (only now found the USB connector for charging) before continuing my journey ...
OK, the saga continues. Installed the Arduino IDE on a Mac and could successfully compile WriteInstinct, but now I can't connect to the board via USB. As the USB adapter is using a strange connector and my laptop only has USB-C I need to go through a dongle which could be causing problems, but I also read that Big Sur is causing issues. I can't find anything useful online which would help me troubleshoot that part.
Could i use the BT adapter work for the initial calibration phase?
Looks like I need to find a different computer, the windows machine I was using for this project is too locked down for this. Will try again tomorrow.
No. It's included in the IDE I downloaded via the Windows Store. unfortunately, that puts it into a directory for which I don't have admin rights on this particular machine. Will need to remove it and download it the normal way. Let's see if that works
Arduino: 1.8.18 (Windows Store 1.8.55.0) (Windows 10), Board: "Arduino Uno" In file included from C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino:32:0: C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\OpenCat.h: In member function 'void Motion::loadDataFromI2cEeprom(unsigned int&)': C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\OpenCat.h:663:51: warning: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: Wire.requestFrom(DEVICE_ADDRESS, skillHeader); ^ In file included from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground/utility/Adafruit_CPlay_LIS3DH.h:33:0, from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h:21, from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground/Adafruit_CircuitPlayground.h:3, from C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\OpenCat.h:1, from C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino:32: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\libraries\Wire\src/Wire.h:68:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int) uint8_t requestFrom(int, int); ^~~~~~~~~~~ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\libraries\Wire\src/Wire.h:65:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t) uint8_t requestFrom(uint8_t, uint8_t); ^~~~~~~~~~~ In file included from C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino:32:0: C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\OpenCat.h: At global scope: C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\OpenCat.h:857:1: warning: narrowing conversion of '-9.0e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] }; ^ C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\OpenCat.h:857:1: warning: narrowing conversion of '2.25e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\OpenCat.h:857:1: warning: narrowing conversion of '-9.0e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\OpenCat.h:857:1: warning: narrowing conversion of '2.25e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\OpenCat.h:857:1: warning: narrowing conversion of '-9.0e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\OpenCat.h:857:1: warning: narrowing conversion of '-2.25e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\OpenCat.h:857:1: warning: narrowing conversion of '-9.0e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\OpenCat.h:857:1: warning: narrowing conversion of '-2.25e+1' from 'double' to 'int8_t {aka signed char}' inside { } [-Wnarrowing] C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\OpenCat.h: In function 'int SoundLightSensorPattern(char*)': C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\OpenCat.h:1105:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] skillByName("rest", 1, 1, 1); ^ C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino: In function 'void setup()': C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino:149:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] motion.loadBySkillName("rest"); ^ C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino: In function 'void loop()': C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino:261:29: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] skillByName("rest"); ^ C:\Users\ott030\Documents\Arduino\OpenCat\WriteInstinct\WriteInstinct.ino:300:45: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] motion.loadBySkillName("calib"); ^ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp: In member function 'void Adafruit_CircuitPlayground::playTone(uint16_t, uint16_t, bool)': C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:238:3: error: 'PLLFRQ' was not declared in this scope PLLFRQ = (PLLFRQ & 0xCF) | 0x30; // Route PLL to async clk ^~~~~~ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:238:3: note: suggested alternative: 'PCIFR' PLLFRQ = (PLLFRQ & 0xCF) | 0x30; // Route PLL to async clk ^~~~~~ PCIFR C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:239:3: error: 'TCCR4A' was not declared in this scope TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on ^~~~~~ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:239:3: note: suggested alternative: 'TCCR0A' TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on ^~~~~~ TCCR0A In file included from c:\program files\windowsapps\arduinollc.arduinoide_1.8.55.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\io.h:99:0, from c:\program files\windowsapps\arduinollc.arduinoide_1.8.55.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\pgmspace.h:90, from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/Arduino.h:28, from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground/utility/Adafruit_CPlay_LIS3DH.h:30, from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h:21, from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:30: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:239:16: error: 'COM4A0' was not declared in this scope TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on ^ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:239:16: note: suggested alternative: 'COM0A0' C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:239:30: error: 'PWM4A' was not declared in this scope TCCR4A = _BV(COM4A0) | _BV(PWM4A); // Clear on match, PWMA on ^ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:239:30: note: suggested alternative: 'PWM' C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:240:3: error: 'TCCR4B' was not declared in this scope TCCR4B = _BV(PWM4X) | scalebits; // PWM invert ^~~~~~ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:240:3: note: suggested alternative: 'TCCR0B' TCCR4B = _BV(PWM4X) | scalebits; // PWM invert ^~~~~~ TCCR0B In file included from c:\program files\windowsapps\arduinollc.arduinoide_1.8.55.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\io.h:99:0, from c:\program files\windowsapps\arduinollc.arduinoide_1.8.55.0_x86__mdqgnx93n4wtt\hardware\tools\avr\avr\include\avr\pgmspace.h:90, from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/Arduino.h:28, from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground/utility/Adafruit_CPlay_LIS3DH.h:30, from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground/Adafruit_Circuit_Playground.h:21, from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:30: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:240:16: error: 'PWM4X' was not declared in this scope TCCR4B = _BV(PWM4X) | scalebits; // PWM invert ^ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:240:16: note: suggested alternative: 'PWM' C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:241:3: error: 'TCCR4D' was not declared in this scope TCCR4D = 0; // Fast PWM mode ^~~~~~ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:241:3: note: suggested alternative: 'TCCR0A' TCCR4D = 0; // Fast PWM mode ^~~~~~ TCCR0A C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:242:3: error: 'TCCR4E' was not declared in this scope TCCR4E = 0; // Not enhanced mode ^~~~~~ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:242:3: note: suggested alternative: 'TCCR0A' TCCR4E = 0; // Not enhanced mode ^~~~~~ TCCR0A C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:243:3: error: 'DT4' was not declared in this scope DT4 = 0; // No dead time ^~~ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:243:3: note: suggested alternative: 'DD4' DT4 = 0; // No dead time ^~~ DD4 C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:249:3: error: 'TC4H' was not declared in this scope TC4H = hi1; ^~~~ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:249:3: note: suggested alternative: 'PC4' TC4H = hi1; ^~~~ PC4 C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:250:3: error: 'OCR4C' was not declared in this scope OCR4C = lo1; // TOP ^~~~~ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:250:3: note: suggested alternative: 'OCR2A' OCR4C = lo1; // TOP ^~~~~ OCR2A C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:252:3: error: 'OCR4A' was not declared in this scope OCR4A = lo2; // 50% duty ^~~~~ C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.55.0_x86__mdqgnx93n4wtt\libraries\Adafruit_Circuit_Playground\Adafruit_CircuitPlayground.cpp:252:3: note: suggested alternative: 'OCR2A' OCR4A = lo2; // 50% duty ^~~~~ OCR2A exit status 1 Error compiling for board Arduino Uno. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
Could you take a screen recording to show the operations resulting the above error messages?
And the program I was trying to compile is 'WriteInstinct' as according to assembly instructions.
Thanks for the quick reply. I simply downloaded the Arduino IDE from the Windows Store which seem to include the Circuit Playground by default. Let me see if I can remove it.
I'm confused because we are not using "Adafruit_CircuitPlayground" library in the project. All the error messages are related to it. Which program are you trying to compile? You may use the codes in ModuleTest or Arduino tutorials to get familiar with the Arduino environment.