Hallo liebe Gemeinde.
Ich bin schon etliche Jahre leser dieses Forums.
Nun habe ich mal ein Problem mit dem Rainbow-Programm aus dem Lexikon.
Ich will mich mit dem Leds WS2812 beschäftigen und das Programm verstehen.Leider lässt es sich nicht kompilieren
Was mache ich falsch bzw wo liegt mein Fehler.
als Fehlermeldung kommt dann:
Error : 211 Line : 40 External routine not found [WS2812B] , in File : C:\Users\Andreas\Documents\LED-WS2812.bas
Error : 61 Line : 30 Label not found [SELECT_RAINBOWBSC] , in File : C:\Users\Andreas\Documents\LED-WS2812.bas
Error : 61 Line : 30 Label not found [SELECT_RAINBOWBSC] , in File : C:\Users\Andreas\Documents\LED-WS2812.bas
Error : 61 Line : 35 Label not found [SETCOLOR] , in File : C:\Users\Andreas\Documents\LED-WS2812.bas
Error : 61 Line : 35 Label not found [SETCOLOR] , in File : C:\Users\Andreas\Documents\LED-WS2812.bas
Error : 61 Line : 36 Label not found [SEND] , in File : C:\Users\Andreas\Documents\LED-WS2812.bas
Error : 61 Line : 36 Label not found [SEND] , in File : C:\Users\Andreas\Documents\LED-WS2812.bas
Display All
Ich bin schon etliche Jahre leser dieses Forums.
Nun habe ich mal ein Problem mit dem Rainbow-Programm aus dem Lexikon.
Ich will mich mit dem Leds WS2812 beschäftigen und das Programm verstehen.Leider lässt es sich nicht kompilieren
Was mache ich falsch bzw wo liegt mein Fehler.
als Fehlermeldung kommt dann:
Error : 211 Line : 40 External routine not found [WS2812B] , in File : C:\Users\Andreas\Documents\LED-WS2812.bas
Error : 61 Line : 30 Label not found [SELECT_RAINBOWBSC] , in File : C:\Users\Andreas\Documents\LED-WS2812.bas
Error : 61 Line : 30 Label not found [SELECT_RAINBOWBSC] , in File : C:\Users\Andreas\Documents\LED-WS2812.bas
Error : 61 Line : 35 Label not found [SETCOLOR] , in File : C:\Users\Andreas\Documents\LED-WS2812.bas
Error : 61 Line : 35 Label not found [SETCOLOR] , in File : C:\Users\Andreas\Documents\LED-WS2812.bas
Error : 61 Line : 36 Label not found [SEND] , in File : C:\Users\Andreas\Documents\LED-WS2812.bas
Error : 61 Line : 36 Label not found [SEND] , in File : C:\Users\Andreas\Documents\LED-WS2812.bas
Source Code
- ' LED WS2812
- $regfile = "m88def.dat"
- $crystal = 16000000
- $hwstack = 40
- $swstack = 16
- $framesize = 32
- '----[IMPLEMENT RAINBOW]--------------------------------------------------------
- $lib "Rainbowbsc.lib"
- $external Ws2812b
- Declare Sub Select_rainbowbsc(byval Channel As Byte)
- Declare Sub Setcolor(byval Lednr As Word , Color() As Byte)
- Declare Sub Send()
- '#Rainbow0
- Const Rainbowbsc0_len = 1 'just 1 Led
- Const Rainbowbsc0_port = Portb
- Const Rainbowbsc0_pin = Pb0
- 'Global Color-variables
- Dim Color(3) As Byte
- R Alias Color(_base) : G Alias Color(_base + 1) : B Alias Color(_base + 2)
- '----[MAIN]--------------------------------------------------------------------
- Call Select_rainbowbsc(0) 'select Rainbow
- Do
- R = not R'alternately red and dark
- Call Setcolor(0 , Color())
- Call Send()
- Waitms 500
- Loop
- End