forked from MakersTeam/Edison
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSPItest.py
More file actions
31 lines (27 loc) · 737 Bytes
/
SPItest.py
File metadata and controls
31 lines (27 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""
SPItest.py
This example test the functionality of SPI to check the writing process
Using the Arduino Expansion Board:
SCLK = Pin 13
MISO = Pin 12
MOSI = Pin 11
EN = Pin 10
This example code is in the public domain.
Revision History
------------------------------------------------
Author Date Description
------------------------------------------------
Carlos Mata 1-29-2015 Example created
Carlos Mata 3-18-2015 Last Modification
"""
import time
import mraa
spi= mraa.Spi(0)
#buff = bytearray('\x02\xee\x10')
try:
while True:
spi.writeByte(0x12)
spi.writeByte(0x35)
#spi.write(buff)
except KeyboardInterrupt:
print ""