Question

Hi there,

I am using the chipKIT Wi-FIRE with the basic I/O shield and MPLABX IDE. I want to read out the temperature sensor of the I/O shield via I2C and write the value to the OLED display. I do see a value on the OLED-display that reacts on the sensors environment (i.e. it increases when I put my finger on the sensor), however it is clearly wrong as I get 360°C for room temperature (before anyone asks: I know I have to multiply the sensor value with 2^-4 to get a the correct numerical value). To initialize the bus and read out the sensor value I followed an example found on https://sites.google.com/site/johnkneenconnectedlab/i2c, but it goes much beyond what I actually want to accomplish and modifying that code just leads to the result mentioned above.

So here is my question: is there some starter code to simply read out the temperature sensor in this setup?

 

Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Thanks a lot for your answers!

The thing is that I really want to use MPLAB X as this is the environment used in Imagination Technologies University Programm - just because it was mentioned: there are no examples in there on how to use the I2C-bus.

Thanks anyway - I will just keep on trying!

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now