Hi,
So I managed to get all the source files and libraries, make the changes and recompile on my PC to a new set of hex files “emonpi_usa.hex” and “emonpi_usa_bootloader.hex”.
I had to remount the filesystem to be writable with ‘$sudo mount -o remount,rw /dev/mmcblk0p2 /’.
I uploaded the new hex files to the ‘~/emonpi/firmware/compiled directory’ and run a modified ‘update’ script using my file names. It runs through properly without errors. When I run the ‘reset’ script I can then see the correct power reading updating every second.
When I reboot the emonPi though, the power reading is still the previous non-usa reading. If I run the ‘reset’ script only via command line, then I get the correct reading.
Why the need for that ‘reset’ every time I boot? Do I need to fix something else to boot on the correct reading?
Side note, when running the reset command, the LCD screen with go black, come back up and will cycle through the menus. When it gets to the “Raspberry Pi / Booting…”, the first like “Raspberry Pi” will change to the correct power reading but the second line with stay on “Booting…” until I press the LCD button to cycle through.
Secondary question about the sensor. I can work with the default 100A for now but as you mentioned I would probably be better going with a lower rated sensor. I was reading another thread (here) that pointed me to this sensor which is rated up to 25A. This is a voltage output sensor (1V according to datasheet) compared to the 100A one which I believe is a current output sensor. Note that accuracy is not necessarily a huge concern for me at this point and if I need to manipulate the reading from software somehow, if that is possible, that it fine. I have read this page but I am not too sure if sensor would work out of the box of if I had to do some modifications on the resistor as suggested in the other threads. Any direction on this is appreciated.
Thanks.