modified for testing
Install Extension
and use javasript sources from INFO/test-full.ts in following editors
- CALLIOPE - https://makecode.calliope.cc/#editor
- MICROBIT - https://makecode.microbit.org/#editor
- CALLIOPE/beta - https://makecode.calliope.cc/beta#editor
- MICROBIT/beta - https://makecode.microbit.org/beta#editor
program tested
- HW - HelloWorld
- FULL - test-full.ts
- CALLIOPE
- MICROBIT
- CALLIOPE
added platform/Utils.cpp
- CALLIOPE
- MICROBIT HW
integrated Utils.h/Utils.cpp into exttestc.cpp
- MICROBIT HW
strip down Utils to log()
- MICROBIT FULL
add includes from Utils.cpp
- MICROBIT FULL
add all sources from Utils.cpp
include etutils.h / etutils.cpp
- MICROBIT HW
- CALLIOPE HW
Bug in exttestc.cpp!
removed duplicate code in exttestc.cpp
- CALLIOPE FULL
- MICROBIT HW
reduced etutils.h/.cpp, renamed log() to etlog()
- CALLIOPE FULL
- MICROBIT FULL
renamed etlog() back to log()
- CALLIOPE HW
- MICROBIT HW
Bug in exttestc.cpp (renamed method etlog() was still called)
fixed wrong calls of etlog() in exttestc.cpp.
commented in logInt and logFloat.
- CALLIOPE HW
- MICROBIT HW
error in etutils.cpp, missing include
fixed missing include in etutils.cpp
- CALLIOPE HW
- MICROBIT HW
wrong call to float2char
fixed wrong call to float2char
- CALLIOPE FULL
- MICROBIT HW
renamed methods log() / logInt() to et_log() and et_log_int()
- CALLIOPE FULL
- MICROBIT HW
To use this package, go to https://makecode.microbit.org, click Add package
and search for gator-light. The package is located here
//Sets the value of the light variable to the value read from the gator:light
let light = 0
light = gatorlight.light(AnalogPin.P0, gatorlightType.Lux)
Use ||Get light on pin||
to read the light value from a gator:light sensor attached to a given pin in lux or the straight ADC value.
//Read light value and write it to the micro:bit screen as a bar graph.
let light = 0
basic.forever(function () {
light = gatorlight.light(AnalogPin.P0, gatorlightType.Lux)
led.plotBarGraph(
light,
1023
)
})
- for PXT/microbit
MIT
gatorlight=github:sparkfun/pxt-gator-light