Closed Intechgreater closed 1 year ago
OK first, I believe you did this but just to start with low hanging fruit, did you copy the following files from the Firmware/src/Shahara/Libraries directory to your Arduino sketch folder?
Appreciate the rapid response! Yes, the entire firmware directory was copied to the Arduino sketch folder. Got it to work by typecasting the msg variable:
checksum = fletch_check((uint8_t*)msg, strlen(msg));
FYI, when I compile the code with Arduino 1.8.13, it compiles successfully.
I believe you could also update fletch_check to pass in a char *data instead of _uint8t *data by updating the function to, uint16_t fletch_check( char *data, int count ); This change would need to be done in the .ino, PLM.cpp and PLM.h.
Replacing uint8_t *data
with char *data
in the .ino, PLM.cpp and PLM.h did compile in 1.8.16 and run. Thanks!
Another hurdle was finding the correct board core & fuse settings for the actual chip model on my demo boards - a regular ATmega328 as opposed to the ATmega328P in the docs. Exciting to at least get the boards modified for the application and onboard blue LED blinking so far!
I think you're bringing up some good questions/topics. For the record, I believe the only difference between the ATmega328 and ATmega328p is the "p" denotes the lower power option. I would think the fuse settings for both silicon are the same but I could be wrong. I used the fuse settings in the repo to program both the regular and p versions and seen no issues.
If you have seen issues or seen that different fuse settings are required, please share your findings.
Feel free to open a new issue stating that ATmega328p fuse settings provided in the repo don't work for the Atmega328.(https://github.com/DudeYarvie/JARViE_Home_Automation_Modem/tree/master/Firmware/src/Shahara)/Shahara_ATmega328p_MCU_FUSE_Settings.txt
As shown in the attached screenshot, getting the compile error "invalid conversion from 'char' to 'uint8_t" on line 49 in PLM_Shahara_Master_Transmit_1.0.ino: checksum = fletch_check(msg, strlen(msg));
Please advise