sandysound
Member
Hello all!
I am new to programming and coding, and have bought a few items to start me off with a project in mind.
I have a teensy 3.1 and some blinkM LED's
I thought I would start off by loading the teensy with the blinkM communicator script which would let me run the blinkM software and control it from my computer, but it does not compile. Any ideas on how to make this teensy compatible? Or is that possible?
I get these errors:
BlinkMCommunicator.ino: In function 'void loop()':
BlinkMCommunicator.ino:144:13: warning: unused variable 'rc' [-Wunused-variable]
In file included from BlinkMCommunicator.ino:36:0:
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h: At global scope:
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:113:13: warning: 'void BlinkM_startPower()' defined but not used [-Wunused-function]
static void BlinkM_startPower()
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:119:13: warning: 'void BlinkM_stopPower()' defined but not used [-Wunused-function]
static void BlinkM_stopPower()
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:195:12: warning: 'int BlinkM_getVersion(byte)' defined but not used [-Wunused-function]
static int BlinkM_getVersion(byte addr)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:213:12: warning: 'int BlinkM_checkAddress(byte)' defined but not used [-Wunused-function]
static int BlinkM_checkAddress(byte addr)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:242:13: warning: 'void BlinkM_setTimeAdj(byte, byte)' defined but not used [-Wunused-function]
static void BlinkM_setTimeAdj(byte addr, byte timeadj)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:251:13: warning: 'void BlinkM_fadeToRGB(byte, byte, byte, byte)' defined but not used [-Wunused-function]
static void BlinkM_fadeToRGB(byte addr, byte red, byte grn, byte blu)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:262:13: warning: 'void BlinkM_fadeToHSB(byte, byte, byte, byte)' defined but not used [-Wunused-function]
static void BlinkM_fadeToHSB(byte addr, byte hue, byte saturation, byte brightness)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:284:13: warning: 'void BlinkM_fadeToRandomRGB(byte, byte, byte, byte)' defined but not used [-Wunused-function]
static void BlinkM_fadeToRandomRGB(byte addr, byte rrnd, byte grnd, byte brnd)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:294:13: warning: 'void BlinkM_fadeToRandomHSB(byte, byte, byte, byte)' defined but not used [-Wunused-function]
static void BlinkM_fadeToRandomHSB(byte addr, byte hrnd, byte srnd, byte brnd)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:305:13: warning: 'void BlinkM_getRGBColor(byte, byte*, byte*, byte*)' defined but not used [-Wunused-function]
static void BlinkM_getRGBColor(byte addr, byte* r, byte* g, byte* b)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:319:13: warning: 'void BlinkM_playScript(byte, byte, byte, byte)' defined but not used [-Wunused-function]
static void BlinkM_playScript(byte addr, byte script_id, byte reps, byte pos)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:337:13: warning: 'void BlinkM_off(uint8_t)' defined but not used [-Wunused-function]
static void BlinkM_off(uint8_t addr)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:358:13: warning: 'void BlinkM_readScriptLine(byte, byte, byte, blinkm_script_line*)' defined but not used [-Wunused-function]
static void BlinkM_readScriptLine(byte addr, byte script_id,
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:438:12: warning: 'int BlinkM_getInputsO(byte)' defined but not used [-Wunused-function]
static int BlinkM_getInputsO(byte addr)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:454:12: warning: 'int BlinkM_getInputs(byte, byte*)' defined but not used [-Wunused-function]
static int BlinkM_getInputs(byte addr, byte inputs[])
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:471:12: warning: 'int BlinkM_doFactoryReset()' defined but not used [-Wunused-function]
static int BlinkM_doFactoryReset()
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:511:13: warning: 'void BlinkMmk2_setLED(byte, byte)' defined but not used [-Wunused-function]
static void BlinkMmk2_setLED(byte addr, byte ledn)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:519:13: warning: 'void BlinkMmk2_rotateLEDs(byte, byte)' defined but not used [-Wunused-function]
static void BlinkMmk2_rotateLEDs(byte addr, byte rot)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkMCommunicator.cpp.o: In function `BlinkM_findFirstI2CDevice':
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:83: undefined reference to `twi_writeTo'
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkMCommunicator.cpp.o: In function `BlinkM_scanI2CBus':
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:71: undefined reference to `twi_writeTo'
collect2: error: ld returned 1 exit status
Error compiling.
Link to the code: It's called the blinkMCommunicator
http://thingm.com/products/blinkm/blinkm-quick-start-guide/
I use a teensy 3.1 on my pixhawk quadcopter to convert Mavlink messages to frsky using this code:
https://github.com/lvale/MavLink_FrSkySPort
This is based on:
http://diydrones.com/forum/topics/amp-to-frsky-x8r-sport-converter
I am probably biting off more than I can chew but my goal is to be able to add to their code and use the blinkM as navigation/status lights and respond to the mode changes of the copter - change colour/flash etc.
Cheers,
Sandy
I am new to programming and coding, and have bought a few items to start me off with a project in mind.
I have a teensy 3.1 and some blinkM LED's
I thought I would start off by loading the teensy with the blinkM communicator script which would let me run the blinkM software and control it from my computer, but it does not compile. Any ideas on how to make this teensy compatible? Or is that possible?
I get these errors:
BlinkMCommunicator.ino: In function 'void loop()':
BlinkMCommunicator.ino:144:13: warning: unused variable 'rc' [-Wunused-variable]
In file included from BlinkMCommunicator.ino:36:0:
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h: At global scope:
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:113:13: warning: 'void BlinkM_startPower()' defined but not used [-Wunused-function]
static void BlinkM_startPower()
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:119:13: warning: 'void BlinkM_stopPower()' defined but not used [-Wunused-function]
static void BlinkM_stopPower()
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:195:12: warning: 'int BlinkM_getVersion(byte)' defined but not used [-Wunused-function]
static int BlinkM_getVersion(byte addr)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:213:12: warning: 'int BlinkM_checkAddress(byte)' defined but not used [-Wunused-function]
static int BlinkM_checkAddress(byte addr)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:242:13: warning: 'void BlinkM_setTimeAdj(byte, byte)' defined but not used [-Wunused-function]
static void BlinkM_setTimeAdj(byte addr, byte timeadj)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:251:13: warning: 'void BlinkM_fadeToRGB(byte, byte, byte, byte)' defined but not used [-Wunused-function]
static void BlinkM_fadeToRGB(byte addr, byte red, byte grn, byte blu)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:262:13: warning: 'void BlinkM_fadeToHSB(byte, byte, byte, byte)' defined but not used [-Wunused-function]
static void BlinkM_fadeToHSB(byte addr, byte hue, byte saturation, byte brightness)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:284:13: warning: 'void BlinkM_fadeToRandomRGB(byte, byte, byte, byte)' defined but not used [-Wunused-function]
static void BlinkM_fadeToRandomRGB(byte addr, byte rrnd, byte grnd, byte brnd)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:294:13: warning: 'void BlinkM_fadeToRandomHSB(byte, byte, byte, byte)' defined but not used [-Wunused-function]
static void BlinkM_fadeToRandomHSB(byte addr, byte hrnd, byte srnd, byte brnd)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:305:13: warning: 'void BlinkM_getRGBColor(byte, byte*, byte*, byte*)' defined but not used [-Wunused-function]
static void BlinkM_getRGBColor(byte addr, byte* r, byte* g, byte* b)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:319:13: warning: 'void BlinkM_playScript(byte, byte, byte, byte)' defined but not used [-Wunused-function]
static void BlinkM_playScript(byte addr, byte script_id, byte reps, byte pos)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:337:13: warning: 'void BlinkM_off(uint8_t)' defined but not used [-Wunused-function]
static void BlinkM_off(uint8_t addr)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:358:13: warning: 'void BlinkM_readScriptLine(byte, byte, byte, blinkm_script_line*)' defined but not used [-Wunused-function]
static void BlinkM_readScriptLine(byte addr, byte script_id,
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:438:12: warning: 'int BlinkM_getInputsO(byte)' defined but not used [-Wunused-function]
static int BlinkM_getInputsO(byte addr)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:454:12: warning: 'int BlinkM_getInputs(byte, byte*)' defined but not used [-Wunused-function]
static int BlinkM_getInputs(byte addr, byte inputs[])
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:471:12: warning: 'int BlinkM_doFactoryReset()' defined but not used [-Wunused-function]
static int BlinkM_doFactoryReset()
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:511:13: warning: 'void BlinkMmk2_setLED(byte, byte)' defined but not used [-Wunused-function]
static void BlinkMmk2_setLED(byte addr, byte ledn)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:519:13: warning: 'void BlinkMmk2_rotateLEDs(byte, byte)' defined but not used [-Wunused-function]
static void BlinkMmk2_rotateLEDs(byte addr, byte rot)
^
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkMCommunicator.cpp.o: In function `BlinkM_findFirstI2CDevice':
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:83: undefined reference to `twi_writeTo'
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkMCommunicator.cpp.o: In function `BlinkM_scanI2CBus':
/var/folders/j6/r5315c9n5l7bvcl9j643n6lr0000gn/T/build1105936832829713415.tmp/BlinkM_funcs.h:71: undefined reference to `twi_writeTo'
collect2: error: ld returned 1 exit status
Error compiling.
Link to the code: It's called the blinkMCommunicator
http://thingm.com/products/blinkm/blinkm-quick-start-guide/
I use a teensy 3.1 on my pixhawk quadcopter to convert Mavlink messages to frsky using this code:
https://github.com/lvale/MavLink_FrSkySPort
This is based on:
http://diydrones.com/forum/topics/amp-to-frsky-x8r-sport-converter
I am probably biting off more than I can chew but my goal is to be able to add to their code and use the blinkM as navigation/status lights and respond to the mode changes of the copter - change colour/flash etc.
Cheers,
Sandy