Hi guys,
I'm interested in controlling my robot from my laptop, and the CH340T USB to Serial + nRF24L01 combo looked promising:
eBay
DealExtreme
AliExpress
Unfortunately I can't seem to find example code on the internet, and I'm struggling to get it to respond to anything I send to it over PuTTY.
My backup plan is us plug an Arduino in to my laptop and have that drive the nRF24L01, but the CH340T us a much cleaner solution for me.
Has anyone had luck getting this working?
Any pointers for getting started?
I'm using the MIRF library on the robot, and I've tried translating MIRF to Python, and sending commands using the serial library, but like I said, no response.
Thanks
Update:
I've written a simple bit of python code, and if I use two CHT340T's (the USB adapter's) the nRF24L01's can talk to each other:
import time
import serial
# configure the serial connections (the parameters differs on the device you are connecting to)
ser = serial.Serial(
port='COM5',
baudrate=9600,
parity=serial.PARITY_ODD,
stopbits=serial.STOPBITS_TWO,
bytesize=serial.SEVENBITS
)
ser.isOpen()
input=1
while 1 :
input = str(int(time.time()%60))
ser.write(input + '\r\n')
out = ''
# let's wait one second before reading output (let's give device time to answer)
time.sleep(1)
while ser.inWaiting() > 0:
out += ser.read(1)
if out != '':
print ">>" + out
The remaining bit is finding the channel, payload, etc. that the CHT340T's setup the nRF24L01's at, and I can get the Arduino configured to match.