Data Streamer support in MakeCode for micro:bit
Перейти к файлу
Abhijith Chatra 782fa1d482 0.0.15 2018-10-18 17:45:35 -07:00
.vscode init 2018-05-22 22:24:30 -07:00
.gitignore init 2018-05-22 22:24:30 -07:00
.travis.yml setting baud rate (#1) 2018-06-07 13:35:20 -07:00
Makefile init 2018-05-22 22:24:30 -07:00
README.md added code of conduct 2018-05-23 08:23:09 -07:00
enums.d.ts setting baud rate (#1) 2018-06-07 13:35:20 -07:00
extension.cpp Add format to the print 2018-10-18 17:15:10 -07:00
extension.ts Default decimal digit 2018-10-18 17:45:33 -07:00
icon.png adding icon 2018-05-23 07:38:11 -07:00
pxt.json 0.0.15 2018-10-18 17:45:35 -07:00
shims.d.ts Add format to the print 2018-10-18 17:15:10 -07:00
test.ts Add format to the print 2018-10-18 17:15:10 -07:00
tsconfig.json init 2018-05-22 22:24:30 -07:00

README.md

Hacking STEM Build Status

Support for Hacking STEM activities in https://makecode.microbit.org

Usage

Go to https://makecode.microbit.org, click on the gearwheel menu and select Add Package, search for hacking stem and select this package.

Reference

serial.writeMilliNumber #serialWriteMilliNumber

The ||serial:write milli number|| block scales the input value by 1000 and writes it to the serial as a floating point number.

serial.writeMilliNumber(1);

For example,

serial.writeMilliNumber(1);

writes the following number to serial

0.001

This example reads the analog signal on pin P0, scales it to 3.3v and writes it to serial.

let mv = 0
basic.forever(() => {
    mv = pins.analogReadPin(AnalogPin.P0) * 3300 / 1023
    serial.writeMilliNumber(mv)
})

License

MIT

Supported targets

  • for PXT/microbit (The metadata above is needed for package search.)

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.