Module info:
All I2C mode responses are in ASCII format however, they do not terminate with a
rather, they terminate with a NULL. The Null termination makes data
manipulation easier once it has been received.
default address: 0x63
I am looking for a generic i2c example. I didn't see a generic i2c example in the Tutorials and Examples. All I saw were examples under the Using I2C section. I then had a look in the I2C Class in the Reference. The i2c reference page sort of makes sense, but I am so used to serial that all this i2c bits and bytes confuses me.
What confuses me is this: address 0x63 represents the ASCII decimal of 99. Besides 0x63 as an address what is that format also called? The reason why I ask is, I can change the address from 1 to 127. So, for an example, I send the ASCII decimal 25 to the module to change the address, what does 25 represent? Is there a ASCII decimal to whatever that format is converter? Another thing that I am unsure about is when I receive data in ASCII format from the module, how do I convert that to readable output?
I basically need an i2c example of setup, read and write.
so far I have:
function onInit() {
I2C1.setup({scl:b6, sda:b7});
}
onInit();
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Module info:
All I2C mode responses are in ASCII format however, they do not terminate with a
rather, they terminate with a NULL. The Null termination makes data
manipulation easier once it has been received.
default address: 0x63
I am looking for a generic i2c example. I didn't see a generic i2c example in the Tutorials and Examples. All I saw were examples under the Using I2C section. I then had a look in the I2C Class in the Reference. The i2c reference page sort of makes sense, but I am so used to serial that all this i2c bits and bytes confuses me.
What confuses me is this: address 0x63 represents the ASCII decimal of 99. Besides 0x63 as an address what is that format also called? The reason why I ask is, I can change the address from 1 to 127. So, for an example, I send the ASCII decimal 25 to the module to change the address, what does 25 represent? Is there a ASCII decimal to whatever that format is converter? Another thing that I am unsure about is when I receive data in ASCII format from the module, how do I convert that to readable output?
I basically need an i2c example of setup, read and write.
so far I have: