Learning BASIC with a clock display
Glen Walker (2585) 469 posts |
Would it be mad to use RISC OS Pico (or even the full RISC OS) to learn BASIC and drive something like this: https://shop.pimoroni.com/products/microdot-phat Would it even be possible…? I need a new clock for our kitchen and I’ll be damned if I take the easy option of going out to buy a ready-made one! |
Chris Evans (457) 1614 posts |
How easy it would be, will be governed by how the hardware is controlled. Looking up the data sheet for the IS31FL3730 LED matrix driver chips may tell you! |
Andrew Conroy (370) 724 posts |
The documentation linked from the Pimoroni page suggests that it uses I2C, so it ahould be pretty straight forward to drive it:
|
Glen Walker (2585) 469 posts |
Yeah I was digging around in the source code provided by Pimorini and it doesn’t look outlandish. Any good guides for driving I2C in BASIC? |
Glen Walker (2585) 469 posts |
Yeah I was digging around in the source code provided by Pimorini and it doesn’t look outlandish. Any good guides for driving I2C in BASIC? |
Andrew Conroy (370) 724 posts |
This is the SWI you need: OS_IICOp |
Glen Walker (2585) 469 posts |
Cool thanks! I’m not sure on my exact approach yet – since I was hoping to have a little display that would show time and also alert me if I have any emails or do other such cool things (all of which will need a network connection) I might end up attaching it to my main Pi 3 computer (possibly by breaking out the I2C pins from the GPIO and then running a cable to I can have the clock display detachable) |
Steve Drain (222) 1620 posts |
It is fairly straightforward with OS_IICOp. I pared it down to Setup, Write and Read procedures when experimenting to interface with a MCP23017 attached to a Pi, before writing my MCPIO module. You can download that file at http://www.kappa.me.uk/Miscellaneous/swRPIO.zip to give you some ideas, although I have not revisited it for a long while. |