Python LT8900 via SPI

Changes To Python LT8900 via SPI
Login

Changes to "Python LT8900 via SPI" between 2020-04-28 18:04:25 and 2020-04-28 18:09:22

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
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







+
+
+
+









-
+
-







Python LT8900 via SPI
=====================

This Python module enables a Python to talk to an LT8900 radio attached to an serial peripheral interface (SPI).

Example
-------

    #! /usr/bin/env python3
    
    import time

    import gpiozero
    import lt8900_spi
    
    # Need to keep this attached to drive the line high -- if the object disappears then
    # the GPIO port gets reconfigured as an input port
    # Note broadcom pin numbers are used
    reset_gpio = gpiozero.LED(24)
    reset_gpio.on()
    def reset_module_via_gpio():
    def reset_module_via_gpio():    
    
    	reset_gpio.off()
    	time.sleep(0.1)
    	reset_gpio.on()
    	time.sleep(0.1)

    radio = lt8900_spi.radio(0, 0, {
    	'reset_command': reset_module_via_gpio