Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/APLPi/microbit
Tools for using the micro:bit with Dyalog APL on the Pi
https://github.com/APLPi/microbit
Last synced: 3 months ago
JSON representation
Tools for using the micro:bit with Dyalog APL on the Pi
- Host: GitHub
- URL: https://github.com/APLPi/microbit
- Owner: APLPi
- Created: 2017-01-21T11:54:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-03-10T13:19:19.000Z (over 7 years ago)
- Last Synced: 2024-03-27T03:45:02.886Z (3 months ago)
- Language: APL
- Size: 15.6 KB
- Stars: 1
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Lists
- awesome-microbit - micro:bit for Dyalog APL on the Pi - Tools for using the micro:bit (via MicroPython serial connection) with the Dyalog APL programming language on the Raspberry Pi. (π©βπ» Programming / ποΈ Interaction Languages)
- awesome-microbit-zh - microbit for Dyalog APL on the Pi - Tools for using the micro:bit (via MicroPython serial connection) with the Dyalog APL programming language on the Raspberry Pi. (ηΌη¨ / ε Άδ»δΊ€δΊθ―θ¨)
README
# APLPi/microbit
This repository contains tools for using the micro:bit with Dyalog APL
on the Raspberry Pi, with focus on MicroPython. Morten Kromberg is blogging about his experiences with this technology on the [Dyalog Blog.](http://www.dyalog.com/blog/2017/01/raspberry-apl-pi-and-python-on-the-microbit-2/)##The microbit class
The microbit class provides an interface from Dyalog APL to the MicroPython
REPL, using serial communications. The interface relies on the MicroPython REPL being up and running on the micro:bit. The easiest way to make this happen is to use the "mu" editor on the Pi to compile and "flash" a trivial Python programme to the micro:bit. The file `repl_prompt.py` contains a suitable bit of code which will display a ">>" prompt on the micro:bit display when it is reset (because that looks a bit like the Python >>> prompt). Once this is done, the micro:bit will power up (and can be reset to) a state where you can see the ">>" and the REPL is running.If you cloned the repository to `/home/pi/microbit` and have started Dyalog APL, you should be able to execute simple Python commands.
]load /home/pi/microbit/microbit
mbββNEW microbit ''
mb.PyREPL '2+2'
4You can display morse code using the LEDs on the micro:bit using the Morse example:
]load /home/pi/microbit/Morse
Β Morse.Init '/home/pi/microbit/MorseCode.txt'
Morse.Display 'SOS'A video of this in action is available [on YouTube](https://www.youtube.com/watch?v=yfGsSLEifAs).
More examples to come!