ferenc-hechler / pxt-exttestc9

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ExtTestC

Test Releases

modified for testing

Install Extension

and use javasript sources from INFO/test-full.ts in following editors

program tested

  • HW - HelloWorld
  • FULL - test-full.ts

v0.2.4

  • CALLIOPE
  • MICROBIT

v0.2.5

  • CALLIOPE

v0.2.6

v0.2.7

added platform/Utils.cpp

  • CALLIOPE
  • MICROBIT HW

v0.2.8

integrated Utils.h/Utils.cpp into exttestc.cpp

  • MICROBIT HW

v0.2.9

strip down Utils to log()

  • MICROBIT FULL

v0.3.0

add includes from Utils.cpp

  • MICROBIT FULL

v0.3.1

add all sources from Utils.cpp

v0.3.2

include etutils.h / etutils.cpp

  • MICROBIT HW
  • CALLIOPE HW

Bug in exttestc.cpp!

v0.3.3

removed duplicate code in exttestc.cpp

  • CALLIOPE FULL
  • MICROBIT HW

v0.3.4

reduced etutils.h/.cpp, renamed log() to etlog()

  • CALLIOPE FULL
  • MICROBIT FULL

v0.3.5:

renamed etlog() back to log()

  • CALLIOPE HW
  • MICROBIT HW

Bug in exttestc.cpp (renamed method etlog() was still called)

v0.3.6:

fixed wrong calls of etlog() in exttestc.cpp.

v0.3.7:

commented in logInt and logFloat.

  • CALLIOPE HW
  • MICROBIT HW

error in etutils.cpp, missing include

v3.8.1

fixed missing include in etutils.cpp

  • CALLIOPE HW
  • MICROBIT HW

wrong call to float2char

v3.8.2

fixed wrong call to float2char

  • CALLIOPE FULL
  • MICROBIT HW

v3.9.0

renamed methods log() / logInt() to et_log() and et_log_int()

  • CALLIOPE FULL
  • MICROBIT HW

~ hint

To use this package, go to https://makecode.microbit.org, click Add package and search for gator-light. The package is located here

~

Basic usage

//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.

Example: Light Detector

//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
    )
})

Supported targets

  • for PXT/microbit

License

MIT

gatorlight=github:sparkfun/pxt-gator-light

About

License:MIT License


Languages

Language:TypeScript 57.8%Language:C++ 39.5%Language:C 2.2%Language:Makefile 0.5%