Introducing the Pi-cromite: first steps


Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 3884
Posted: 08:54am 06 Apr 2017      

The Pi 3 is ridiculously fast

The attached version implements simple digital I/O

SETPIN x,DIN [,pullup] [,pulldown]
setpin x,dout
setpin x,off

pin(x)=1
pin(x)=0
? pin(x)

NB: The pin number refers to the physical pin on the 40-pin connector and not the Broadcom GPIO number

the following loop has a cycle time of 3.3 microseconds!!!!!





[code]do:pin(7)=1:pin(7)=0:loop[/code]

2017-04-06_184832_mmbasic.zip

The file must now be run as root to get priority access to the GPIO so use

sudo ./mmbasic