0

micro:bit Projects: LEGO Power Functions IR Sender @microbit_edu #microbit #microbitlove #microbitmonday

From Philipp Henkel via hackster.io

We experimented with visual programming languages and we love colorful interlocking plastic bricks. The desire to control a LEGO® train using a web-based, visual development environment was born.

We started with a Scratch and Arduino based solution. We had a working prototype that proved to be error-prone and complex in the setup.

In our second approach, we used the German sibling of the micro:bit. The Calliope board comes with a motor driver which reduced the required hardware to the board itself and some home-made connection cables. Our first field test with a LEGO® model failed tremendously. The test revealed that we want to fully control at least two motors and lights. The more the better. The Calliope is limited to one motor.

Finally, we built a custom package for MakeCode that enables a micro:bit with an attached infrared LED to send commands to a Power Functions IR receiver – like a remote control. Now we were able to control multiple devices with minimal hardware requirements and provide easy-to-use programming blocks in addition.

We published our package on GitHub at https://github.com/philipphenkel/pxt-powerfunctions. Please raise an issue there if you have any problems.

You need basically two things: a micro:bit board and an infrared LED that emits IR light at a wavelength of 940 nm. Any IR LED from an old remote control will probably do the job. We tested with SFH 4546 and TSAL 6200. We attached the LED with banana connectors and female jumper cables. The long leg of the LED needs to be connected to an analog pin. We recommend pin 0 because this one is configured as default in the MakeCode package. Plug the LED’s short leg into GND.

Full project writeup here!


Make a robot friend with Adafruit’s CRICKIT – A Creative Robotics & Interactive Construction Kit. It’s an add-on to our popular Circuit Playground Express, FEATHER and other platforms to make and program robots with CircuitPython, MakeCode, and Arduino. Start controlling motors, servos, solenoids. You also get signal pins, capacitive touch sensors, a NeoPixel driver and amplified speaker output. It complements & extends your boards so you can still use all the goodies on the microcontroller, now you have a robotics playground as well.

Join 7,500+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython in 2018 – Python on Microcontrollers is here!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/


Maker Business — Fewer startups, and other collateral damage from the 2018 tariffs

Wearables — Light as a Worbla feather

Electronics — How to make your own magnetic field probe!

Biohacking — The State of DNA Analysis in Three Mindmaps

Python for Microcontrollers — One year of CircuitPython weeklies!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.