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
#21
Rhaaa i make this arduino.py it ok the remote it see but i have an error whith pypilot_hat hat.conf don t exist i creat it not ok and the second error it in proc device tree hat custom_0 i think i don t install on openplotter the good pypilot or what it necesarry to install thé hat whith rf remote all work good sorry for all Time awser but i m in finish and After 2 day for understand i m in end road thanks have a good day
Reply
#22
Ohh i understand the problèm what Can i made for change hat.py because i don t have external eeprom you Say hard coding custom_0 m'y level it very Bad for coding thanks
Reply
#23
You can simply edit the file hat.conf to manually specify which hardware you have attached.

Without the eeprom it cannot automatically detect what type of display or if there is an arduino or not.

for example:

{"remote":false,"host":"localhost","actions":{"auto":["ir030C1000","ir030C1800","KEY_POWER","gpio17","rf68012F50","rf7E1C2950","rf7E0C2950"],"menu":["ir030D1000","ir030D1800","KEY_MUTE","gpio23","rf64012F50","rf7D1C2950","rf7D0C2950"],"port1":["ir03201800","ir03201000","KEY_UP","gpio27","rf62012F50","rf771C2950","rf770C2950"],"starboard1":["ir03211800","ir03211000","KEY_DOWN","gpio22","rf61012F50","rf7B1C2950","rf7B0C2950"],"select":["ir030B1000","ir030B1800","KEY_SELECT","gpio18","rf6F1C2950","rf6F0C2950"],"port10":["ir03111800","ir03111000","KEY_LEFT","gpio6","rf3F1C2950","rf3F0C2950"],"starboard10":["ir03101800","ir03101000","KEY_RIGHT","gpio5","rf5F1C2950","rf5F0C2950"],"tack":["gpio26","rf7F1C2910","rf7F0C2910"],"dodge_port":[],"dodge_starboard":[],"engage":[],"disengage":[],"1":[],"-1":[],"2":[],"-2":[],"10":[],"-10":[],"compassmode":[],"gpsmode":[],"windmode":[],"tackport":[],"tackstarboard":[],"5":[],"-5":[],"center":[],"none":[]},"pi.ir":false,"arduino.ir":true,"arduino.nmea.in":false,"arduino.nmea.out":false,"arduino.nmea.baud":"38400","lcd":{"contrast":60,"invert":false,"backlight":10,"flip":false,"language":"en","bigstep":10,"smallstep":1},"hat":{"mpu":{"driver":"mpu9255","port":"\/dev\/i2c-1"},"lcd":{"driver":"jlx12864","port":"\/dev\/spidev0.0"},"arduino":{"device":"\/dev\/spidev0.1","resetpin":16,"hardware":0.23},"lirc":"gpio4"}}
Reply
#24
(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.

Hi Sean,

I'm looking at the latest controller schematics:

  https://pypilot.org/schematics/wp_controller.pdf
  https://pypilot.org/schematics/highpower_controller.pdf

Both show the 5V atmega328 has an 8Mhz crystal.

(The hat arduino also has an 8Mhz crystal, but it's running at 3.3v)

Is 8MHz the right crystal for the motor controller?  If so, could the motor controller be run at 3.3V?
Reply
#25
Well... 8mhz or 16mhz crystal should be "ok" the program detects the crystal frequency at boot.

As for 3v3.. in theory yes, but some rudder feedback sensors require 5v, so I have kept 5v. You could try 3v but be careful to ensure every component used accepts it.
Reply
#26
(2021-10-20, 01:03 AM)seandepagnier Wrote: Well...   8mhz or 16mhz crystal should be "ok"  the program detects the crystal frequency at boot.

As for 3v3..  in theory yes, but some rudder feedback sensors require 5v, so I have kept 5v.  You could try 3v but be careful to ensure every component used accepts it.

That's super, thank you.

It's spring here, and we're nearly out of COVID lockdown.  I'm looking forward to some summer cruising, and I'm currently working on a new revision of my PyPilot PCB.  

I'd like to keep my PCB as compatible as I can with the main branch software.  Quick question: Do the pin assignments and functions in the schematic on the website still match main?  In particular, the m328 hat pinouts in pypilot_tinypilot.pdf, and the m328 mc pinouts in wp_controller.pdf.
Reply
#27
Yes the schematics are up to date. If I changed anything the old hardware would remain compatible too.
Reply
#28
(2021-10-20, 03:40 PM)seandepagnier Wrote: Yes the schematics are up to date.   If I changed anything the old hardware would remain compatible too.

That's great news.  I was fearing I'd send off for boards and only find out something had changed when I tried the firmware.
Reply
#29
Hi Guys,
I am trying to build the arduino hat for the Rf remote but after reading the post I still have some doubts.
I am Using arduino mini pro 3,3v at 8mhz. + Rf 433mhz receiver connecting data to PD2 in arduino.

Connections, just to clarify: MISO, MOSI, SCK, SS from arduino to Raspberry. then, RESET from arduino to pin 16 in Raspberry?? and I read at the beggining of this post to connect "something" to GPIO 27(pin 13 raspeberry), but I not sure what to connect there... am I missing any connection??
Connecting this way, I see that MOSI and SCK connection will be shared with the Display. I presume it is not a problem.
As this mini pro arduino is rated at 8mhz, is it required to connect an external 8 mhz cristal at 7, 8 pin as depicted in the diagram??

I have tried to load the hat.ino with the requiered libreries in the arduino, but I got this error message:

HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':

(.text+0x0): multiple definition of `__vector_18'

sketch\hat.ino.cpp.o (symbol from plugin)Sad.text+0x0): first defined here

HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':

(.text+0x0): multiple definition of `__vector_19'

sketch\hat.ino.cpp.o (symbol from plugin)Sad.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1

Error compilando para la tarjeta Arduino Pro or Pro Mini.

A friend of mine, has tried as well and having same message..
Any clue???

Last thing, If I solve the connection doubt, and I am able to load th sketch,
the last remaining thing should be just to enable the interface, by  typeing "sudo systemctl enable pypilot_hat" ??? It is writen in the very comprehensive guide writen by Ironman.

Sorry for the multiple questions, and for my poor knowledge.
Thanks for the help
Reply
#30
Did you try to program the arduino with "make upload" ?

Also, yes I use an 8mhz xtal just to ensure stable frequency. You could modify the fuse bytes in the makefile to use the internal oscillator.


It does share the spi pins, ok

https://pypilot.org/schematics/pypilot_tinypilot.pdf

The pin is optional but used to program an "also optional" i2c eeprom. This small device helps pypilot know what type of hardware is attached to the 40 pin header. If you don't have it, you can manually specify in a file on the sdcard as well.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)