Hello everyone!
This is my first post! Newbi on Mongoose-OS and happy to learn!
-
My goal is:
To get the MCP9808 example application (see README.md) to run on my ESP32 using Mongoose-OS. -
My actions are: [describe your actions - code, commands, etc]
- First of all I have verified the hardware setup using Arduino examples, so I know the sensor is connected correctly and that you can get the temp value over I2C.
- I cloned the test app: mos clone https://github.com/mongoose-os-apps/empty app3
- I removed all code in the main.c file in the /app3/src folder and added the MCP9808 example application code.
- Did these changes to my mos.yml file:
Added the 2 following rows under libs:
- origin: https://github.com/mongoose-os-libs/mcp9808-i2c
- origin: https://github.com/mongoose-os-libs/i2c
Added these lines:
config_schema:
- ["i2c.enable", "b", true, {title: "Enable I2C"}]
- ["i2c.unit_no", "i", 0, {title: "Which hardware unit ot use, 0 or 1"}]
- ["i2c.sda_gpio", "i", 2, {title: "GPIO to use for SDA"}]
- ["i2c.scl_gpio", "i", 0, {title: "GPIO to use for SCL"}]
- I then built the firmware: mos build --platform esp32
- Flashed it to the device with out a problem.
-
The result I see is: [show the result - log, etc]
-
My expectation & question is: [describe your expectation and your question]
What am I doing wrong here? I think it would be easy to get this little example up and running? Is it something obvious I have missed?
Thank you in advance for any guidance!