A program to measure the temperature using the Max6675 board. The temperature is shown on 8x8 Max7219 matrix display and it is saved on SD as well.
Dependencies: MAX7219 SDFileSystem mbed
Fork of MAXREFDES99_demo by
The program measures the temperature using the Max6675 board designed for Arduino. The temperature is shown on Max7219 8x8 matrix display (designed for Arduino as well) as text marque from right to left. The fonf size is 5x7 so the last row is used to show some info:
- All leds off: Normal temperature measuring - Leds shifting: Saving on SD card - Leds blinking: SD card missing or damaged
The Blue "user button" is used to save measured temperature on SD card. First click start saving, the second stop the process. Together the temperature is saved also the time. The time is reset when the process start. Connecting the USB to PC it's possible to see instant temperature and all saved data on SD.
max6675.h
- Committer:
- lore71
- Date:
- 2018-10-04
- Revision:
- 12:1bd4a9f09a8d
File content as of revision 12:1bd4a9f09a8d:
#ifndef MAX6675_h #define MAX6675_h #include "mbed.h" class max6675 { SPI& spi; DigitalOut ncs; public: max6675(SPI& _spi, PinName _ncs); void select(); void deselect(); float read_temp(); private: PinName _CS_pin; PinName _SO_pin; PinName _SCK_pin; int _units; float _error; }; #endif