Best practice to implement new firmware?

I am on the Raspberry Pi 3 and I wrote code to read out I2C sensors using the F52.
This works fine when I flash the firmware onto the farmduino using my laptop. However I would like the Pi to upload this new firmware everytime it starts. Therefore I would like to now how to replace the current firmware with my newer version. What is the best way to do just that ?

On top of that I would like to be able to tell the farmduino to read out an I2C Sensor from the WebApp and also to get the data delivered back to the WebApp. Where can I add this functionality ?

Welcome @neo

The FarmBot Inc. farmbot-arduino-firmware respository seems to be missing Contributor guidelines documentation.

Summary

  • Sign a Contributor Agreement
  • Fork the repository
  • Create a new branch where you will put your modified source code
  • Create Test(s) where possible
  • Create a new Pull Request
  • Wait for response(s) from repository owner

The farmbot-arduino-firmware respository has 1 Open Pull Request relating to F52

This requirement will need many source modifications (including db schema).
Start by reading the farmbot_os code for handling reading a Sensor (a named_pin type)
Ask FarmBot Inc whether the value(s) should be stored in the sensor_readings database and which sources in the Web App will need modification.

Thank you for your answer!
I was hoping for a somewhat easier approach since I found the following on the official farmbot website:
image

This however did not work for me since I was not able to copy any files onto the SD-card with the farmbotOS on it.

Oh, Ok, sorry. I assumed that you wanted to contribute your modified software to the FarmBot Community :slight_smile:

That custom.hex procedure should work … I used it on my bot recently.
What was the OS that you plugged the FBOS SDHC card into ?

In the long run I might want to contribute the modified software but for the moment I want to make sure it really works as intended.
The OS I was using is a Linux distro (Pop_os, running on Ubuntu 22.04).
I am able to view the files but I do not have the the necessary rights to write to the card.

Ok, did you try the file copy using sudo ?

Edit: On my Linux PC (debian 12) my FBOS SDHC card is auto-mounted and I see 2 directories

  • BOOT-A
  • disk

That BOOT-A folder is where you put your custom.hex

Thank you for the answer! That is where I went wrong…

2 Likes