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
#11
Thanks Sean, looks like I did it right.

I ordered an 8MHz Pro Mini ,but it appears to run at 16
Can it be that Arduino.py works fine at 16 MHZ fine but the browser config does not?
I thought that SPI runs at CLOCK/2
Reply
#12
the processor clock rate is different from the spi clock speed

because the raspberry is master clock it sets the rate: the arduino is the slave
Reply
#13
I am at a loss what could be my problem with the remote:


When I run Arduino.py I can see codes from both RF and IR remotes
In the browser I don't see anything coming in.
The GPIO pins on the Pi are registering correctly.

-Using tinypilot image 2020_10_27.img
-Latest hat.ino from git.

I  have a new Arduino Pro Mini confirmed running at 8MHz.
I am using various RF remotes I have lying around with the IR LED on Arduino pin3
Tried a Pi Zero and a PI 2b , Arduino SPI wired directly to the PI with short wires .
Supply voltages are 3.29 V on all pins
I have no external EEPROM and only IMU connected


Any pointers would be appreciated
Reply
#14
without the external eeprom it's likely the hat program will not attempt to communicate with the arduino because the eeprom describes the hardware attached to the pi, and without it, it assumes the original 26 pin tinypilot which is just a SPI nokia5110, i2c imu, and buttons

So maybe you can modify hat.py and harddcode it where it tries to open custom_0
Reply
#15
(2020-11-06, 09:00 PM)seandepagnier Wrote: without the external eeprom it's likely the hat program will not attempt to communicate with the arduino because the eeprom describes the hardware attached to the pi, and without it, it assumes the original 26 pin tinypilot which is just a SPI nokia5110, i2c imu, and buttons

So maybe you can modify hat.py and harddcode it where it tries to open custom_0

Thanks Sean, 

Tbh, I am a hack when it comes to programming, but I will give it a try.
Reply
#16
(2020-11-07, 11:49 AM)SYWindveer Wrote:
(2020-11-06, 09:00 PM)seandepagnier Wrote: sans l'eeprom externe, il est probable que le programme hat n'essaiera pas de communiquer avec l'arduino car l'eeprom décrit le matériel attaché au pi, et sans lui, il suppose le tinypilot d'origine à 26 broches qui n'est qu'un SPI nokia5110, i2c imu, et boutons

Vous pouvez donc peut-être modifier hat.py et le coder en dur là où il essaie d'ouvrir custom_0

Merci Sean, 

Tbh, je suis un hack quand il s'agit de programmation, mais je vais essayer.
Hello i have the same problèm whith pypilot hat Arduino.py and web page for configuration don.t see m'y Arduino Uno whith réceptor but it see like dev/ttyAMA0 on pypilot openplotter app how to résolve it thanks

Another thing i see rfremote.ino but the Arduino ide don't compile the sketch i don't know for what i have the rcswitch librairi installed
Reply
#17
I had to modify the rcswitch library to get reliable operation. Can you simply type make in the folder with .ino?

the arduino for rf reception is connected via spi, not uart, see wiring:
https://pypilot.org/schematics/pypilot_tinypilot.pdf
Reply
#18
(2021-07-21, 03:20 AM)seandepagnier Wrote: I had to modify the rcswitch library to get reliable operation.   Can you simply type make in the folder with .ino?

 the arduino for rf reception is connected via spi, not uart, see wiring:
https://pypilot.org/schematics/pypilot_tinypilot.pdf

Thanks i don t understand this ok but  i  wiring thé connexion by spi  whith SLK miso mosi i make this and go pypilot???
Reply
#19
also wire reset to pin 16, and te ss pin. So 7 wires needed from arduino to pi.
in pypilot/arduino/hat
make upload

After you can run pypilot_hat, but again it wont detect it without editing ~/.pypilot/hat.conf and adding
{"arduino":{"device":"\/dev\/spidev0.1","resetpin":16,"hardware":0.23},"lirc":"gpio4"}}

Normally this is written to the i2c eeprom so that everything is autodetected
Reply
#20
(2021-07-21, 09:34 AM)seandepagnier Wrote: câblez également la réinitialisation à la broche 16 et la broche ss. Donc 7 fils nécessaires d'arduino à pi.
dans pypilot/arduino/hat
make upload

Après vous pouvez exécuter pypilot_hat, mais encore une fois, il ne le détectera pas sans éditer ~/.pypilot/hat.conf et ajouter
{"arduino":{"device":"\/dev\/spidev0. 1","resetpin":16,"hardware":0.23},"lirc":"gpio4"}}

Normalement, ceci est écrit dans l'eeprom i2c afin que tout soit détecté automatiquement

Hello ok now i see in terminal whith arduino.py the command my error it i change pi and i don t active spi now i have just 3 wire SLK mosi miso and the Arduino power whith USB whith the last message i understand it Bad i make the good wiring you programm the Arduino Uno directly whith the pi thank you very much for your conseil
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)