Search found 27 matches

by BruinBear
Mon Dec 17, 2018 9:08 pm
Forum: micro:bit boards
Topic: Converting struct.pack to MakeCode Javascript blocks
Replies: 1
Views: 3459

Converting struct.pack to MakeCode Javascript blocks

I have some working MicroPython code that uses struct to send data from the micro:bit to another microcontroller board using I2C. I have converted the Python code to send buffered data 'one byte at a time' using the Javascript/Typescript window in https://makecode.microbit.org/ . For example: i2c.wr...
by BruinBear
Thu Jul 19, 2018 8:23 am
Forum: micro:bit boards
Topic: MY9221 - Grove LED Bar
Replies: 6
Views: 7246

Re: MY9221 - Grove LED Bar

Nice!

You just need to work on the Grove ultrasonic module now :D
by BruinBear
Wed Jul 18, 2018 9:09 pm
Forum: micro:bit boards
Topic: MY9221 - Grove LED Bar
Replies: 6
Views: 7246

Re: MY9221 - Grove LED Bar

I know - I have one! They have produced a MakeCode package for the "Grove Inventor's Kit for micro:bit". The package includes support for the non-trivial devices in that Kit (Ultrasonic, 4x7-seg display and Gesture sensor). Very good stuff. Would be good to couple the Grove LED bar with the Grove ul...
by BruinBear
Tue Jul 17, 2018 10:29 pm
Forum: micro:bit boards
Topic: MY9221 - Grove LED Bar
Replies: 6
Views: 7246

Re: MY9221 - Grove LED Bar

Very nice! Thanks for that.
by BruinBear
Sun May 06, 2018 9:17 am
Forum: Drivers for External Components
Topic: MCP9808 High Precision Temperature Sensor
Replies: 16
Views: 22234

Re: MCP9808 High Precision Temperature Sensor

Mike
You are correct. Since you haven't had a reply here, maybe you should raise an issue on GitHub so the author can correct it?
by BruinBear
Mon May 01, 2017 12:12 pm
Forum: micro:bit boards
Topic: UART on Micro:Bit
Replies: 6
Views: 9157

Re: UART on Micro:Bit

I don't know. Have you tried putting a sleep(x) command in before the last uart.init(), where x is a delay in mSecs (e.g. 10)?
by BruinBear
Mon May 01, 2017 9:39 am
Forum: micro:bit boards
Topic: UART on Micro:Bit
Replies: 6
Views: 9157

Re: UART on Micro:Bit

If you initialise the uart without parameters, I think that the USB-UART TX/RX pins are used - which connect to the USB serial convertor on the micro:bit. If you initialise the uart and specify which pins to use, like this uart.init(baudrate=9600, bits=8, parity=None, stop=1, tx=pin0, rx=pin1) then ...
by BruinBear
Sun Apr 30, 2017 6:13 pm
Forum: micro:bit boards
Topic: UART on Micro:Bit
Replies: 6
Views: 9157

Re: UART on Micro:Bit

Possible causes of no data at all:

1. Tx -> Rx
Rx -> Tx
not connected correctly

2. Baud rates/stop bits don't match at both ends.
by BruinBear
Sun Apr 02, 2017 9:53 pm
Forum: micro:bit boards
Topic: Ultrasonic (US-100/HC-SR04) and sound sensor (KY038) libraries
Replies: 12
Views: 15097

Re: Ultrasonic (US-100/HC-SR04) and sound sensor (KY038) libraries

I tried a range of resistances to attentuate the echo signal but it had no effect on the distance measurement.

It's a shame about the 5v requirement for this sensor. Your library gives consistent results so it's quite useable for collision avoidance.
by BruinBear
Sun Apr 02, 2017 5:50 pm
Forum: micro:bit boards
Topic: Ultrasonic (US-100/HC-SR04) and sound sensor (KY038) libraries
Replies: 12
Views: 15097

Re: Ultrasonic (US-100/HC-SR04) and sound sensor (KY038) libraries

I've got two power supplies with a common ground. The 5v supply just connects to the 5v and GND pins on the sensor. The micro:bit is powered from the 3.3V supply and the trig and echo pins on the sensor are connected to the micro:bit i/o pins.