Need help with C++

Turns out they were not :slight_smile: I messed up LSB and HSB. However it does not read bits higher than 15.

Because int are not necessary 32bits in Arduino. Got it.

If you’re working in C or C++ with data that has to be a known size, regardless of the platform, it’s best to use the specific sized types. In this case it would be uint32_t

However, the Arduboy has an 8 bit processor and natively can only work with bytes. Any larger type takes extra code and processing time. It would probably be better if you made pellets an array of uint8_t (or byte if you want to stay with official Arduino types). Then, treat 4 bytes as a row.


Thanks. I already did that :slight_smile:

1 Like