petoi-camp-logo.png
English
EN
English
EN
Chinese
ZH
  • Forum

  • Shop

  • More

    Use tab to navigate through the menu items.
    Phillip Brush
    1d

    On Definition Rule Issues

    3
    0
    Chris Jerome
    Feb 15, 2020

    Raspbery Pi DMP issue and general question

    5
    1
    Hanna Ovr
    Aug 02

    Pest Control Software

    1
    0
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    max ott
    Dec 20, 2021

    Problems with Compiling WriteInstinct

    in Software

    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



    20 answers0 replies
    0
    20 Comments
    R
    Rongzhong Li
    Dec 23, 2021
    Best Answer

    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.



    Like

    max ott
    Dec 25, 2021

    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

    Like

    max ott
    Dec 23, 2021

    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?



    Like

    R
    Rongzhong Li
    Dec 23, 2021

    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.

    Like

    max ott
    Dec 23, 2021

    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.

    Like