OpenMarine

Full Version: RF remote via SPI
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
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/arduino.py 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 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$
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 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.
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 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 ?
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.
Pages: 1 2 3 4