How to program: MLX90614 Infrared Thermometer Module
HNguyen
Posts: 1
I recently purchased the MLX90614 Infrared Thermometer Module (90* FOV) and am not sure how to communicate with the senor. I've read the specifications and understand the commands but I'm not sure how to send it to the module so that I can use it.
What I know:
- Module can sent and receive serial data.
- Module can have a set trigger temperature (temperature at which the alarm pin will go high)
- Other features, but none that I am concerned with for what I plan on using the senor for.
What I don't know:
- How to send the serial commands to the module, through the SIG pin using a C or C++ compiler.
What I want the module to do exactly is to have a set temperature, for example 30*C, and if the temperature passes 30*C the alarm pin will go high. I know that the command to do this is "!TEMA" and that the there is an example program included for the senor that does exactly what I need. The issue is that everything seems to be using BASIC Stamp.
My current setup I am using for this project is a MC9S12DG256 microprocessor on a Dragon12 board with Code Warrior. I've done some reading on how to send serial information with C / C++ but aren't exactly sure how to send the data to the single SIG pin.
From my best guess I would think it would be something like,
I was wondering if anyone knew the C command or could suggest a library with the same functionality. I've found a few but aren't quite sure how to use them. If not, could anyone who has also purchased this senor please tell me what they used and how they got it to work. Any information would be very helpful.
What I know:
- Module can sent and receive serial data.
- Module can have a set trigger temperature (temperature at which the alarm pin will go high)
- Other features, but none that I am concerned with for what I plan on using the senor for.
What I don't know:
- How to send the serial commands to the module, through the SIG pin using a C or C++ compiler.
What I want the module to do exactly is to have a set temperature, for example 30*C, and if the temperature passes 30*C the alarm pin will go high. I know that the command to do this is "!TEMA" and that the there is an example program included for the senor that does exactly what I need. The issue is that everything seems to be using BASIC Stamp.
My current setup I am using for this project is a MC9S12DG256 microprocessor on a Dragon12 board with Code Warrior. I've done some reading on how to send serial information with C / C++ but aren't exactly sure how to send the data to the single SIG pin.
From my best guess I would think it would be something like,
DDRA_BIT0 = 0xFF; <C command> PORTA_BIT0, <baudrate>, [noparse][[/noparse]0, "!TEMA", slaveddr, alarmlowbyte, alarmhighbyte]
I was wondering if anyone knew the C command or could suggest a library with the same functionality. I've found a few but aren't quite sure how to use them. If not, could anyone who has also purchased this senor please tell me what they used and how they got it to work. Any information would be very helpful.
Comments