Added blinka test file for testing blinka.
This commit is contained in:
parent
0160ef6e97
commit
d3f96b0a6b
19
blinka-test.py
Normal file
19
blinka-test.py
Normal file
@ -0,0 +1,19 @@
|
||||
import board
|
||||
import digitalio
|
||||
import busio
|
||||
|
||||
print("Hello, blinka!")
|
||||
|
||||
# Try to create a Digital input
|
||||
pin = digitalio.DigitalInOut(board.D4)
|
||||
print("Digital IO ok!")
|
||||
|
||||
# Try to create an I2C device
|
||||
i2c = busio.I2C(board.SCL, board.SDA)
|
||||
print("I2C ok!")
|
||||
|
||||
# Try to create an SPI device
|
||||
spi = busio.SPI(board.SCLK, board.MOSI, board.MISO)
|
||||
print("SPI ok!")
|
||||
|
||||
print("done!")
|
4
setup.sh
4
setup.sh
@ -100,10 +100,8 @@ if [! dpkg -l | grep -q python3-libgpiod]; then
|
||||
sudo apt install -y i2c-tools
|
||||
fi
|
||||
|
||||
python3 ./blinka-test.py
|
||||
python3 blinka-test.py
|
||||
echo -e "$line\nSetup complete\n$line\n"
|
||||
# sudo python3 raspi-blinka.py
|
||||
|
||||
|
||||
echo -e "\n\n\n$line$line$line\nSetup completed.\nExecute the command 'python3 temp-calc.py' to calculate\nthe temperature.\n# DESIGNED AND ENGINEERED BY KSHITIJ.\n# END OF SCRIPT\n$line$line$line\n\n\n"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user