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
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?
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/ you can monitor just events from the arduino
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
initializing arduino
Traceback (most recent call last):
  File "", line 409, in <module>
  File "", line 392, in main
    a = arduino(config)
  File "", line 37, in __init__
    self.nmea_connect_time = time.monotonic()
AttributeError: 'module' object has no attribute 'monotonic'
please use python3 not python2
(2020-10-22, 06:57 PM)seandepagnier Wrote: please use python3 not python2

Same error on tinypilot, is tp using Python 2 as well?
try "python3" for python3
python3 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

Just realized my nano runs at 16 MHz, I'll get me a 3v3 8MHz mini, and try again.
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.
(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

[['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 ?
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.

Forum Jump:

Users browsing this thread: 1 Guest(s)