Exemplo n.º 1
0
import sys
sys.path.append("../lib")
from crazyradio import Crazyradio

radio = Crazyradio()
radio.set_channel(100)
radio.set_data_rate(Crazyradio.DR_250KPS)
radio.set_mode(Crazyradio.MODE_PRX)
for i in range(0, 100):
	res = radio.receive()
	if res:
		radio.sendAck([i])
	print(res)
radio.close()
Exemplo n.º 2
0
import sys

sys.path.append("../lib")
from crazyradio import Crazyradio

radio = Crazyradio()
radio.set_channel(100)
radio.set_data_rate(Crazyradio.DR_250KPS)
radio.set_mode(Crazyradio.MODE_PTX)
for i in range(0, 100):
    res = radio.send_packet([i])
    print(res.data)
radio.close()
Exemplo n.º 3
0
import sys

sys.path.append("../lib")
from crazyradio import Crazyradio

radio = Crazyradio()
radio.set_channel(100)
radio.set_data_rate(Crazyradio.DR_250KPS)
radio.set_mode(Crazyradio.MODE_PRX)
for i in range(0, 100):
    res = radio.receive()
    if res:
        radio.sendAck([i])
    print(res)
radio.close()
Exemplo n.º 4
0
import cflib.crtp
from crazyradio import Crazyradio
URI1 = 0xE7E7E7E7E0
URI2 = 0xE7E7E7E7E1
URI3 = 0xE7E7E7E7E2
URI4 = 0xE7E7E7E7E3
URI5 = 0xE7E7E7E7E4
URI6 = 0xE7E7E7E7E5
URI7 = 0xE7E7E7E7E6
URI8 = 0xE7E7E7E7E7
URI9 = 0xE7E7E7E7E8
URI10 = 0xE7E7E7E7E9
cflib.crtp.init_drivers(enable_debug_driver=False)

cr = Crazyradio()

cr.set_channel(100)
cr.set_data_rate(cr.DR_2MPS)
cr.set_address(URI8)

print(cr.send_packet((0xff, 0xfe, 0xff)).ack)  # Init the reboot
# print cr.send_packet((0xff, 0xfe, 0xf0, 0)).ack   # Reboot to Bootloader
print(cr.send_packet((0xff, 0xfe, 0xf0, 1)).ack)  # Reboot to Firmware
Exemplo n.º 5
0
import sys
sys.path.append("../lib")
from crazyradio import Crazyradio

radio = Crazyradio()
radio.set_channel(100)
radio.set_data_rate(Crazyradio.DR_250KPS)
radio.set_mode(Crazyradio.MODE_PTX)
for i in range(0, 100):
    res = radio.send_packet([i])
    print(res.data)
radio.close()
Exemplo n.º 6
0
# Turn on modulated

from crazyradio import Crazyradio
import sys
import struct

cr = Crazyradio()
cr.set_channel(40)
cr.set_data_rate(cr.DR_2MPS)
cr.set_arc(0)
cr.set_mode(cr.MODE_MOD_CARRIER)