Closed Pearsonx10 closed 1 year ago
ill try to look at it by tomorrow. printbits i think is a script, that converts data to binary for output. the reason for the error is the compiler built for h7 doesn't handle data in the same way. i might not of specifically defined type or the code does not format the data specifically. if you try to recompile it for Arduino it will compile. the error is just a mismatch with types because the data size is defined differently or assumed by the compiler. the printbits is a function that takes binary data and outputs it as char data on serial bus as '1', '0' representing binary data. ok hope that explains it. ill take a look at it within 48hrs. ok bye!!
the issue was closed so i suspect the originator figured out the compiler differences between arduino, and H7. i'll still take a look at code within 48hrs as the h7 requires defining data types that are generic in arduio code
Not sure why the issue got closed as I didn't close it. Anyway, I have reopened. Much appreciate you looking at a fix, I am a complete novice at C coding. Also, didn't realise the H7 was different architecture than the other Arduino products.
there are several issues with the h7, it could be that the default size of structured data is 32 bit where in the past processors it was 8 and 16 bit. the issues are complex and can be sorted out in time. this code is mainly for the arduino 328. i'll close this for now. there are also issues in several functions used in other sets of data such a write for sda.
When trying this sketch with Arduino Portenta H7 I get the following error in mutliple places when compiling. Is there a different instruction set for this device?
MLX906040_thermalImaging.ino:279:1: note: suggested alternative: 'printf' <code!> printBits(highByte(worddata[0])); <code!> printBits(lowByte(worddata[0])); Compilation error: 'printBits' was not declared in this scope
If I change all instances of 'printBits' to 'printf' as suggested I get the following error: _include\stdio.h:200:5: note: initializing argument 1 of 'int printf(const char, ...)' int _EXFUN(printf, (const char __restrict, ...) exit status 1 Compilation error: exit status 1_