- Thread starter
- #61
odam2k
Well-Known Member
Wow, that was a simple enhancement... Thanks @Latitude17 I'm glad you persisted
They are talking back and forth over the I2C lines (SDA/SCL), the Mega 2560 simply issues a request for data and the pro/mini just does a write of the 2 integer values (top and bottom reading) which the Mega picks up via a Read. It can't get much simpler than that!
I'm just hardcoding those values right now, but I'll add some code to the I2C module to toggle the digital pins to provide power for each of the 2 sensors on the probe, and read A0 to get the values, which will simply be returned to the Mega 2650.
The unknown part is done, I learned something new, and have another tool in my toolbox should I need it in the future
Now, to plan full scale production of up to 30 of these probes... btw, gonna call my sensors Probes now rather than sensors... (more code and db changes) since Probes can now have multiple sensors... I also think I'll stick to using the Pro/Mini's for the I2C interface since I already have about 10 of them, and I can order them from Banggood, 10 for under $30 Cdn. $3 each isn't a bad price... Also, they are small, easy to program, and have plenty of I/O pins. I can actually just solder the wires directly to them, and put them inline on the wire, wrap em in shrink wrap, and you'll never even notice them...
BTW, I was so excited about all this, I only slept for an hour last night!
They are talking back and forth over the I2C lines (SDA/SCL), the Mega 2560 simply issues a request for data and the pro/mini just does a write of the 2 integer values (top and bottom reading) which the Mega picks up via a Read. It can't get much simpler than that!
I'm just hardcoding those values right now, but I'll add some code to the I2C module to toggle the digital pins to provide power for each of the 2 sensors on the probe, and read A0 to get the values, which will simply be returned to the Mega 2650.
The unknown part is done, I learned something new, and have another tool in my toolbox should I need it in the future
Now, to plan full scale production of up to 30 of these probes... btw, gonna call my sensors Probes now rather than sensors... (more code and db changes) since Probes can now have multiple sensors... I also think I'll stick to using the Pro/Mini's for the I2C interface since I already have about 10 of them, and I can order them from Banggood, 10 for under $30 Cdn. $3 each isn't a bad price... Also, they are small, easy to program, and have plenty of I/O pins. I can actually just solder the wires directly to them, and put them inline on the wire, wrap em in shrink wrap, and you'll never even notice them...
BTW, I was so excited about all this, I only slept for an hour last night!