RF remote via SPI chech Junior Member Posts: 42 Threads: 8 Joined: Sep 2016 Reputation: 0 2021-07-21, 09:44 PM 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 chech Junior Member Posts: 42 Threads: 8 Joined: Sep 2016 Reputation: 0 2021-07-21, 11:06 PM 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 seandepagnier Moderator Posts: 1,477 Threads: 16 Joined: Jun 2016 Reputation: 35 2021-07-22, 02:19 AM 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"}} CapnKernel Member Posts: 130 Threads: 14 Joined: Jul 2019 Reputation: 6 2021-10-19, 10:38 AM (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? seandepagnier Moderator Posts: 1,477 Threads: 16 Joined: Jun 2016 Reputation: 35 2021-10-20, 01:03 AM 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. CapnKernel Member Posts: 130 Threads: 14 Joined: Jul 2019 Reputation: 6 2021-10-20, 05:57 AM (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. seandepagnier Moderator Posts: 1,477 Threads: 16 Joined: Jun 2016 Reputation: 35 2021-10-20, 03:40 PM Yes the schematics are up to date. If I changed anything the old hardware would remain compatible too. CapnKernel Member Posts: 130 Threads: 14 Joined: Jul 2019 Reputation: 6 2021-10-25, 10:57 AM (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. Huevo Junior Member Posts: 16 Threads: 0 Joined: Mar 2021 Reputation: 0 2021-11-22, 03:30 PM 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).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).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 seandepagnier Moderator Posts: 1,477 Threads: 16 Joined: Jun 2016 Reputation: 35 2021-11-22, 09:07 PM (This post was last modified: 2021-11-22, 09:08 PM by seandepagnier.) 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. « Next Oldest | Next Newest »