Due to high demand and inclement weather, expect some shipping delays at this time, orders may not ship for 4-5 business days.
0

I want to drive the adafruit dotstar strip with the bikewhee
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

I want to drive the adafruit dotstar strip with the bikewhee

by dliloch on Fri Dec 03, 2021 9:41 am

Hello,

I just got the raspberry pi pico and I have the adafruit DotStar Digital LED strip - White 144 LED/m 1 meter. I see there is a POV project for a bike wheel POV and I wanted to do that using the pico rather than the Metro Mini. So I installed the Adafruit_DotStar for Arduino library and successfully compiled the strandtest. Then when I tried to compile bikewheel I got this error:

Arduino: 1.8.16 (Linux), Board: "Raspberry Pi Pico, 2MB (no FS), 125 MHz, Small (-Os) (standard), Disabled, Disabled, None, Pico SDK"

/home/pi/Desktop/arduino-1.8.16/arduino-builder -dump-prefs -logger=machine -hardware /home/pi/Desktop/arduino-1.8.16/hardware -hardware /home/pi/.arduino15/packages -tools /home/pi/Desktop/arduino-1.8.16/tools-builder -tools /home/pi/Desktop/arduino-1.8.16/hardware/tools/avr -tools /home/pi/.arduino15/packages -built-in-libraries /home/pi/Desktop/arduino-1.8.16/libraries -libraries /home/pi/Arduino/libraries -fqbn=rp2040:rp2040:rpipico:flash=2097152_0,freq=125,opt=Small,rtti=Disabled,dbgport=Disabled,dbglvl=None,usbstack=picosdk -vid-pid=0000_0000 -ide-version=10816 -build-path /tmp/arduino_build_567347 -warnings=all -build-cache /tmp/arduino_cache_432051 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.pqt-python3.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-python3/1.0.1-base-3a57aed -prefs=runtime.tools.pqt-python3-1.0.1-base-3a57aed.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-python3/1.0.1-base-3a57aed -prefs=runtime.tools.pqt-openocd.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-openocd/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-openocd-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-openocd/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-gcc.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-gcc-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-mklittlefs.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-mklittlefs/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-mklittlefs-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-mklittlefs/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-elf2uf2.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-elf2uf2/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-elf2uf2-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-elf2uf2/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-pioasm.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-pioasm/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-pioasm-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-pioasm/1.3.1-a-7855b0c -verbose /home/pi/Downloads/Kinetic_POV/bikewheel/bikewheel.ino
/home/pi/Desktop/arduino-1.8.16/arduino-builder -compile -logger=machine -hardware /home/pi/Desktop/arduino-1.8.16/hardware -hardware /home/pi/.arduino15/packages -tools /home/pi/Desktop/arduino-1.8.16/tools-builder -tools /home/pi/Desktop/arduino-1.8.16/hardware/tools/avr -tools /home/pi/.arduino15/packages -built-in-libraries /home/pi/Desktop/arduino-1.8.16/libraries -libraries /home/pi/Arduino/libraries -fqbn=rp2040:rp2040:rpipico:flash=2097152_0,freq=125,opt=Small,rtti=Disabled,dbgport=Disabled,dbglvl=None,usbstack=picosdk -vid-pid=0000_0000 -ide-version=10816 -build-path /tmp/arduino_build_567347 -warnings=all -build-cache /tmp/arduino_cache_432051 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.pqt-python3.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-python3/1.0.1-base-3a57aed -prefs=runtime.tools.pqt-python3-1.0.1-base-3a57aed.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-python3/1.0.1-base-3a57aed -prefs=runtime.tools.pqt-openocd.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-openocd/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-openocd-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-openocd/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-gcc.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-gcc-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-mklittlefs.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-mklittlefs/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-mklittlefs-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-mklittlefs/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-elf2uf2.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-elf2uf2/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-elf2uf2-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-elf2uf2/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-pioasm.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-pioasm/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-pioasm-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-pioasm/1.3.1-a-7855b0c -verbose /home/pi/Downloads/Kinetic_POV/bikewheel/bikewheel.ino
Using board 'rpipico' from platform in folder: /home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7
Using core 'rp2040' from platform in folder: /home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7
Detecting libraries used...
/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c/bin/arm-none-eabi-g++ -c -Werror=return-type -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/tools/libpico -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2e8a -DUSB_PID=0x000a "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions -iprefix/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/ @/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/lib/platform_inc.txt -fno-rtti -std=gnu++17 -g -w -x c++ -E -CC -DSERIALUSB_PID=0x000a -DF_CPU=125000000L -DARDUINO=10816 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/cores/rp2040 -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/variants/rpipico /tmp/arduino_build_567347/sketch/bikewheel.ino.cpp -o /dev/null
Alternatives for Adafruit_DotStar.h: [Adafruit_DotStar@1.1.5]
ResolveLibrary(Adafruit_DotStar.h)
-> candidates: [Adafruit_DotStar@1.1.5]
/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c/bin/arm-none-eabi-g++ -c -Werror=return-type -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/tools/libpico -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2e8a -DUSB_PID=0x000a "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions -iprefix/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/ @/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/lib/platform_inc.txt -fno-rtti -std=gnu++17 -g -w -x c++ -E -CC -DSERIALUSB_PID=0x000a -DF_CPU=125000000L -DARDUINO=10816 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/cores/rp2040 -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/variants/rpipico -I/home/pi/Arduino/libraries/Adafruit_DotStar /tmp/arduino_build_567347/sketch/bikewheel.ino.cpp -o /dev/null
Alternatives for avr/power.h: []
ResolveLibrary(avr/power.h)
-> candidates: []bikewheel:31:10: fatal error: avr/power.h: No such file or directory

31 | #include <avr/power.h>
| ^~~~~~~~~~~~~
compilation terminated.
Using library Adafruit_DotStar at version 1.1.5 in folder: /home/pi/Arduino/libraries/Adafruit_DotStar
exit status 1
avr/power.h: No such file or directory

The avr/power.h does exist in my system:
pi@ubuntuK400:~/Desktop/arduino-1.8.16/hardware$ locate avr | grep power.h
/usr/lib/avr/include/avr/power.h
I installed it with apt install avr-libc

Any guidance here would be greatly appreciated.

Sincerely,
Don Isenstadt

dliloch
 
Posts: 19
Joined: Mon Nov 12, 2012 7:06 am

Re: I want to drive the adafruit dotstar strip with the bike

by dliloch on Fri Dec 03, 2021 9:54 am

One other thing ... I noticed that in the strandtest program that did compile I see:
//#include <avr/power.h> // ENABLE THIS LINE FOR GEMMA OR TRINKET
so I commented it out in bikewheel and then I ran into

avr/sleep.h: No such file or directory
the file is in my system
pi@ubuntuK400:~/Desktop/arduino-1.8.16/hardware$ locate avr | grep sleep.h
/usr/lib/avr/include/avr/sleep.h

dliloch
 
Posts: 19
Joined: Mon Nov 12, 2012 7:06 am

Re: I want to drive the adafruit dotstar strip with the bike

by dliloch on Fri Dec 03, 2021 9:57 am

commented out avr/sleep.h ...
and wound up with this error ...

Arduino: 1.8.16 (Linux), Board: "Raspberry Pi Pico, 2MB (no FS), 125 MHz, Small (-Os) (standard), Disabled, Disabled, None, Pico SDK"

/home/pi/Desktop/arduino-1.8.16/arduino-builder -dump-prefs -logger=machine -hardware /home/pi/Desktop/arduino-1.8.16/hardware -hardware /home/pi/.arduino15/packages -tools /home/pi/Desktop/arduino-1.8.16/tools-builder -tools /home/pi/Desktop/arduino-1.8.16/hardware/tools/avr -tools /home/pi/.arduino15/packages -built-in-libraries /home/pi/Desktop/arduino-1.8.16/libraries -libraries /home/pi/Arduino/libraries -fqbn=rp2040:rp2040:rpipico:flash=2097152_0,freq=125,opt=Small,rtti=Disabled,dbgport=Disabled,dbglvl=None,usbstack=picosdk -vid-pid=0000_0000 -ide-version=10816 -build-path /tmp/arduino_build_567347 -warnings=all -build-cache /tmp/arduino_cache_432051 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.pqt-python3.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-python3/1.0.1-base-3a57aed -prefs=runtime.tools.pqt-python3-1.0.1-base-3a57aed.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-python3/1.0.1-base-3a57aed -prefs=runtime.tools.pqt-openocd.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-openocd/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-openocd-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-openocd/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-gcc.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-gcc-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-mklittlefs.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-mklittlefs/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-mklittlefs-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-mklittlefs/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-elf2uf2.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-elf2uf2/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-elf2uf2-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-elf2uf2/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-pioasm.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-pioasm/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-pioasm-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-pioasm/1.3.1-a-7855b0c -verbose /home/pi/Downloads/Kinetic_POV/bikewheel/bikewheel.ino
/home/pi/Desktop/arduino-1.8.16/arduino-builder -compile -logger=machine -hardware /home/pi/Desktop/arduino-1.8.16/hardware -hardware /home/pi/.arduino15/packages -tools /home/pi/Desktop/arduino-1.8.16/tools-builder -tools /home/pi/Desktop/arduino-1.8.16/hardware/tools/avr -tools /home/pi/.arduino15/packages -built-in-libraries /home/pi/Desktop/arduino-1.8.16/libraries -libraries /home/pi/Arduino/libraries -fqbn=rp2040:rp2040:rpipico:flash=2097152_0,freq=125,opt=Small,rtti=Disabled,dbgport=Disabled,dbglvl=None,usbstack=picosdk -vid-pid=0000_0000 -ide-version=10816 -build-path /tmp/arduino_build_567347 -warnings=all -build-cache /tmp/arduino_cache_432051 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.pqt-python3.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-python3/1.0.1-base-3a57aed -prefs=runtime.tools.pqt-python3-1.0.1-base-3a57aed.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-python3/1.0.1-base-3a57aed -prefs=runtime.tools.pqt-openocd.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-openocd/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-openocd-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-openocd/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-gcc.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-gcc-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-mklittlefs.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-mklittlefs/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-mklittlefs-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-mklittlefs/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-elf2uf2.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-elf2uf2/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-elf2uf2-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-elf2uf2/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-pioasm.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-pioasm/1.3.1-a-7855b0c -prefs=runtime.tools.pqt-pioasm-1.3.1-a-7855b0c.path=/home/pi/.arduino15/packages/rp2040/tools/pqt-pioasm/1.3.1-a-7855b0c -verbose /home/pi/Downloads/Kinetic_POV/bikewheel/bikewheel.ino
Using board 'rpipico' from platform in folder: /home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7
Using core 'rp2040' from platform in folder: /home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7
Detecting libraries used...
/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c/bin/arm-none-eabi-g++ -c -Werror=return-type -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/tools/libpico -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2e8a -DUSB_PID=0x000a "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions -iprefix/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/ @/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/lib/platform_inc.txt -fno-rtti -std=gnu++17 -g -w -x c++ -E -CC -DSERIALUSB_PID=0x000a -DF_CPU=125000000L -DARDUINO=10816 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/cores/rp2040 -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/variants/rpipico /tmp/arduino_build_567347/sketch/bikewheel.ino.cpp -o /dev/null
Alternatives for Adafruit_DotStar.h: [Adafruit_DotStar@1.1.5]
ResolveLibrary(Adafruit_DotStar.h)
-> candidates: [Adafruit_DotStar@1.1.5]
/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c/bin/arm-none-eabi-g++ -c -Werror=return-type -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/tools/libpico -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2e8a -DUSB_PID=0x000a "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions -iprefix/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/ @/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/lib/platform_inc.txt -fno-rtti -std=gnu++17 -g -w -x c++ -E -CC -DSERIALUSB_PID=0x000a -DF_CPU=125000000L -DARDUINO=10816 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/cores/rp2040 -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/variants/rpipico -I/home/pi/Arduino/libraries/Adafruit_DotStar /tmp/arduino_build_567347/sketch/bikewheel.ino.cpp -o /dev/null
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
-> candidates: [SPI@1.0]
/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c/bin/arm-none-eabi-g++ -c -Werror=return-type -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/tools/libpico -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2e8a -DUSB_PID=0x000a "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions -iprefix/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/ @/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/lib/platform_inc.txt -fno-rtti -std=gnu++17 -g -w -x c++ -E -CC -DSERIALUSB_PID=0x000a -DF_CPU=125000000L -DARDUINO=10816 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/cores/rp2040 -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/variants/rpipico -I/home/pi/Arduino/libraries/Adafruit_DotStar -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/libraries/SPI /tmp/arduino_build_567347/sketch/bikewheel.ino.cpp -o /dev/null
/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c/bin/arm-none-eabi-g++ -c -Werror=return-type -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/tools/libpico -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2e8a -DUSB_PID=0x000a "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions -iprefix/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/ @/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/lib/platform_inc.txt -fno-rtti -std=gnu++17 -g -w -x c++ -E -CC -DSERIALUSB_PID=0x000a -DF_CPU=125000000L -DARDUINO=10816 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/cores/rp2040 -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/variants/rpipico -I/home/pi/Arduino/libraries/Adafruit_DotStar -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/libraries/SPI /home/pi/Arduino/libraries/Adafruit_DotStar/Adafruit_DotStar.cpp -o /dev/null
/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c/bin/arm-none-eabi-g++ -c -Werror=return-type -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/tools/libpico -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2e8a -DUSB_PID=0x000a "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions -iprefix/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/ @/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/lib/platform_inc.txt -fno-rtti -std=gnu++17 -g -w -x c++ -E -CC -DSERIALUSB_PID=0x000a -DF_CPU=125000000L -DARDUINO=10816 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/cores/rp2040 -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/variants/rpipico -I/home/pi/Arduino/libraries/Adafruit_DotStar -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/libraries/SPI /home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/libraries/SPI/SPI.cpp -o /dev/null
Generating function prototypes...
/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c/bin/arm-none-eabi-g++ -c -Werror=return-type -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/tools/libpico -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2e8a -DUSB_PID=0x000a "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions -iprefix/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/ @/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/lib/platform_inc.txt -fno-rtti -std=gnu++17 -g -w -x c++ -E -CC -DSERIALUSB_PID=0x000a -DF_CPU=125000000L -DARDUINO=10816 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/cores/rp2040 -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/variants/rpipico -I/home/pi/Arduino/libraries/Adafruit_DotStar -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/libraries/SPI /tmp/arduino_build_567347/sketch/bikewheel.ino.cpp -o /tmp/arduino_build_567347/preproc/ctags_target_for_gcc_minus_e.cpp
/home/pi/Desktop/arduino-1.8.16/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/arduino_build_567347/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/home/pi/.arduino15/packages/rp2040/tools/pqt-gcc/1.3.1-a-7855b0c/bin/arm-none-eabi-g++ -c -Wall -Wextra -Werror=return-type -Wno-ignored-qualifiers -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/tools/libpico -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DUSB_VID=0x2e8a -DUSB_PID=0x000a "-DUSB_MANUFACTURER=\"Raspberry Pi\"" "-DUSB_PRODUCT=\"Pico\"" -march=armv6-m -mcpu=cortex-m0plus -mthumb -ffunction-sections -fdata-sections -fno-exceptions -iprefix/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/ @/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/lib/platform_inc.txt -fno-rtti -std=gnu++17 -g -DSERIALUSB_PID=0x000a -DF_CPU=125000000L -DARDUINO=10816 -DARDUINO_RASPBERRY_PI_PICO "-DBOARD_NAME=\"RASPBERRY_PI_PICO\"" -DARDUINO_ARCH_RP2040 -Os -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/cores/rp2040 -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/variants/rpipico -I/home/pi/Arduino/libraries/Adafruit_DotStar -I/home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/libraries/SPI /tmp/arduino_build_567347/sketch/bikewheel.ino.cpp -o /tmp/arduino_build_567347/sketch/bikewheel.ino.cpp.o
/home/pi/Downloads/Kinetic_POV/bikewheel/bikewheel.ino: In function 'void imageInit()':
/home/pi/Downloads/Kinetic_POV/bikewheel/bikewheel.ino:176:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
176 | imagePalette = (uint8_t *)pgm_read_word(&images[imageNumber].palette);
/home/pi/Downloads/Kinetic_POV/bikewheel/bikewheel.ino:177:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
177 | imagePixels = (uint8_t *)pgm_read_word(&images[imageNumber].pixels);
/home/pi/Downloads/Kinetic_POV/bikewheel/bikewheel.ino: In function 'uint16_t readVoltage()':
bikewheel:414:3: error: 'ADMUX' was not declared in this scope
414 | ADMUX = _BV(REFS0) |
| ^~~~~
bikewheel:414:16: error: 'REFS0' was not declared in this scope
414 | ADMUX = _BV(REFS0) |
| ^~~~~
bikewheel:414:12: error: '_BV' was not declared in this scope
414 | ADMUX = _BV(REFS0) |
| ^~~
bikewheel:415:16: error: 'MUX3' was not declared in this scope
415 | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
| ^~~~
bikewheel:415:29: error: 'MUX2' was not declared in this scope
415 | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
| ^~~~
bikewheel:415:41: error: 'MUX1' was not declared in this scope
415 | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
| ^~~~
bikewheel:417:3: error: 'ADCSRA' was not declared in this scope
417 | ADCSRA = _BV(ADEN) | // Enable ADC
| ^~~~~~
bikewheel:417:16: error: 'ADEN' was not declared in this scope
417 | ADCSRA = _BV(ADEN) | // Enable ADC
| ^~~~
bikewheel:418:16: error: 'ADPS2' was not declared in this scope
418 | _BV(ADPS2) | _BV(ADPS1) | _BV(ADPS0); // 1/128 prescaler (125 KHz)
| ^~~~~
bikewheel:418:29: error: 'ADPS1' was not declared in this scope
418 | _BV(ADPS2) | _BV(ADPS1) | _BV(ADPS0); // 1/128 prescaler (125 KHz)
| ^~~~~
bikewheel:418:42: error: 'ADPS0' was not declared in this scope
418 | _BV(ADPS2) | _BV(ADPS1) | _BV(ADPS0); // 1/128 prescaler (125 KHz)
| ^~~~~
bikewheel:425:23: error: 'ADSC' was not declared in this scope
425 | for(ADCSRA |= _BV(ADSC); ADCSRA & _BV(ADSC); ); // Start, await ADC conv.
| ^~~~
bikewheel:426:10: error: 'ADC' was not declared in this scope
426 | i = ADC; // Result
| ^~~
Using library Adafruit_DotStar at version 1.1.5 in folder: /home/pi/Arduino/libraries/Adafruit_DotStar
Using library SPI at version 1.0 in folder: /home/pi/.arduino15/packages/rp2040/hardware/rp2040/1.9.7/libraries/SPI
exit status 1
'ADMUX' was not declared in this scope

dliloch
 
Posts: 19
Joined: Mon Nov 12, 2012 7:06 am

Re: I want to drive the adafruit dotstar strip with the bike

by adafruit_support_mike on Sun Dec 05, 2021 8:53 pm

Those errors are also related to hardware details of AVR microcontrollers. _BV is a macro that maps pin numbers to a bit index in a control register. The othes are constants that refer to specific pins.

ATmega microcontrollers are slow enough that you have to play with hardware registers to get POV timing right. The Pico is faster, so you can probably handle the timing with more general code. You will need to modify the code to work on the new board though.

adafruit_support_mike
 
Posts: 63954
Joined: Thu Feb 11, 2010 2:51 pm

Re: I want to drive the adafruit dotstar strip with the bike

by dliloch on Mon Dec 06, 2021 6:28 am

Now I understand what is going on. It would be a new program. Thanks very much for the information.
-don

dliloch
 
Posts: 19
Joined: Mon Nov 12, 2012 7:06 am

Please be positive and constructive with your questions and comments.