This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RF remote via SPI
#1
I connected an Arduino with a 433 receiver to the RasPi via SPI using GPIO 7,9,10,11,27 and a level shifter.

There are some initial values in the configuration menu, but I see no remote codes coming in
The Arduino and receiver work fine with the RC Switch library.

Is there a way to monitor the communication?
Reply
#2
did you program the arduino with hat.ino?

the rc switch library has some bugs.. I don't use level shifters I run the arduino at 3v3 and this requires 8 mhz crystal.

If you run just pypilot/hat/arduino.py you can monitor just events from the arduino
Reply
#3
Yes, I am using the latest hat.ino from the repository and the latest tinypilot image.
I am using a 5V nano and my receiver is 5V as well, because that's what I have around.


I am getting the error below, I have no nmea time source connected, could that be the problem ?

tc@box:/mnt/mmcblk0p2/tinypilot/pypilot/hat$ python arduino.py
initializing arduino
Traceback (most recent call last):
  File "arduino.py", line 409, in <module>
    main()
  File "arduino.py", line 392, in main
    a = arduino(config)
  File "arduino.py", line 37, in __init__
    self.nmea_connect_time = time.monotonic()
AttributeError: 'module' object has no attribute 'monotonic'
tc@box:/mnt/mmcblk0p2/tinypilot/pypilot/hat$
Reply
#4
please use python3 not python2
Reply
#5
(2020-10-22, 06:57 PM)seandepagnier Wrote: please use python3 not python2

Same error on tinypilot, is tp using Python 2 as well?
Reply
#6
try "python3" for python3
Reply
#7
python3 arduino.py does show output from the RF remote which is great.
In the pilot config screen I do not see any RF codes coming in.

Should tinypilot use Python 3 ?

I can see both versions are installed, but I don't know how to change the default.

tc@box:/usr/bin$ python -V
Python 2.7.13
tc@box:/usr/bin$ python3 -V
Python 3.6.0
tc@box:/usr/bin$


Just realized my nano runs at 16 MHz, I'll get me a 3v3 8MHz mini, and try again.
Reply
#8
it can work at 16mhz if you change fcpu in the makefile but the arduino needs 5 volts for 16mhz. It may work at 16mhz at 3v3 but it's not rated for it.
Reply
#9
(2020-10-25, 07:57 PM)seandepagnier Wrote: it can work at 16mhz if you change fcpu in the makefile but the arduino needs 5 volts for 16mhz.   It may work at 16mhz at 3v3 but it's not rated for it.

I have an 8MHz Pro Mini now.
I am seeing these codes in Arduino.py

[['rf035D5D10', 1]] 0.00037687500000060936 0.2049976559999891
[['rf035D5D10', 2]] 0.00036786499998697764 0.2561497400000121
[['rf035D5D10', 3]] 0.00035020900000404254 0.2859260930000005
[['rf035D5D10', 0]] 0.00031145900001661175 0.2873267189999922
baud rate TX: 0.0  RX 0.0

In the configuration menu I can't program any rf buttons
Pressing keys on the remote, then select a command key  in the setup menu, nothing.
Am I doing it wrong? 
I have no controller or gyro connected , does that matter ?
Reply
#10
You should be able to press a key on the remote, see it display the code in a browser, then click the button in the browser to assign it.

If you press the key on the remote again, it should display the command and apply it as well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)