File tree Expand file tree Collapse file tree 5 files changed +8
-20
lines changed Expand file tree Collapse file tree 5 files changed +8
-20
lines changed Original file line number Diff line number Diff line change 57
57
print ("freq: OK" )
58
58
else :
59
59
print ("freq: NG" )
60
-
Original file line number Diff line number Diff line change 15
15
from machine import I2C
16
16
17
17
i2c = I2C (i2c_id )
18
-
Original file line number Diff line number Diff line change 17
17
print ("exp: " + try_s )
18
18
print ("out: " + str (p ))
19
19
20
- #print(p.name())
21
- #print(p.pin())
22
- #print(p.port())
23
-
24
20
p = Pin ("SW1" , Pin .IN , Pin .PULL_UP )
25
21
if p .mode () != 1 :
26
22
print ("mode: NG" )
27
23
p = Pin ("SW1" , Pin .IN , pull = Pin .PULL_UP )
28
24
if p .pull () != 14 :
29
25
print ("pull: NG" )
30
26
p = Pin ("SW1" , mode = Pin .IN , pull = Pin .PULL_UP )
31
- #print(p)
32
- #print(p.value())
33
27
34
28
p .init (p .IN , p .PULL_UP )
35
29
p .init (p .IN , pull = p .PULL_UP )
36
30
p .init (mode = p .IN , pull = p .PULL_UP )
37
- #print(p)
38
31
print (p .value ())
39
32
40
33
p .init (p .OUT )
56
49
p .on ()
57
50
print (p .value ())
58
51
p .off ()
59
-
Original file line number Diff line number Diff line change 2
2
from machine import SPI
3
3
4
4
machine = os .uname ().machine
5
- if "RA6M1_EK" in machine or "RA4M1_CLICKER" in machine or "RA4M1_EK" in machine or "RA4W1_EK" in machine or "RA6M1_EK" in machine :
5
+ if (
6
+ "RA6M1_EK" in machine
7
+ or "RA4M1_CLICKER" in machine
8
+ or "RA4M1_EK" in machine
9
+ or "RA4W1_EK" in machine
10
+ or "RA6M1_EK" in machine
11
+ ):
6
12
spis = (- 1 , 0 )
7
13
else :
8
14
spis = (- 1 , 0 , 1 )
11
17
for bus in spis :
12
18
try :
13
19
spi = SPI (bus )
14
- #print("SPI", bus)
15
20
except ValueError :
16
21
print ("ValueError" , bus )
17
22
31
36
print (spi )
32
37
spi .init (bits = 8 )
33
38
print (spi )
34
- #spi.init(firstbit=0) # SPI.MSB
35
- #spi.init(sck='P100')
36
- #spi.init(mosi='P101')
37
- #spi.init(miso='P102')
38
39
39
40
spi .deinit ()
40
-
Original file line number Diff line number Diff line change 37
37
for ch in uart_ids :
38
38
try :
39
39
uart = UART (ch )
40
- #print(ch)
41
40
except ValueError :
42
41
print ("ValueError" , bus )
43
42
44
- rxbuf_size = 259
43
+ rxbuf_size = 259
45
44
46
45
ch = UART (try_id , rxbuf = rxbuf_size )
47
46
if str (ch ) == try_s :
50
49
print ("NG" )
51
50
print ("exp: " + try_s )
52
51
print ("out: " + str (ch ))
53
-
You can’t perform that action at this time.
0 commit comments