Git Product home page Git Product logo

toit-max6675's Introduction

MAX6675

Toit driver for the MAX6675, a cold junction compensated K-thermocouple to digital converter. The driver implements the reading of data from MAX6675 over ESP32's native SPI interface or using GPIO pin bit banging.

Installation

jag pkg install github.com/krzychb/toit-max6675

Usage

The following example is using bit banging of GPIO pins.

import gpio
import max6675

//          ESP32 GPIO #  // MAX6675 Function (Pin)
cs_gpio ::=  gpio.Pin 12  // Chip select      (CS)
so_gpio ::=  gpio.Pin 13  // Serial output    (SO)
sck_gpio ::= gpio.Pin 14  // Serial clock     (SCK)


main:
  device := max6675.DriverBitBang
    --cs=cs_gpio
    --so=so_gpio
    --sck=sck_gpio

  max6675 := max6675.Driver device

  while true:
    print "Temperature: $(%0.1f max6675.read.temperature)°C"
    sleep --ms=500

See max6675.toit for an example of reading the temperature from MX6675 using SPI interface of ESP32.

About

  • Toit is a modern high-level language designed specifically for microcontrollers.
  • MAX6675 is a cold junction compensated K-thermocouple to-digital converter able to read temperatures in the range from 0°C to +1024°C.
  • ESP32 is a feature-rich MCU with integrated Wi-Fi and Bluetooth connectivity for a wide range of applications.

Resources

Acknowledgments

  • Florian Loitsch was extremely helpful providing me with several tips on how to implement the driver.

toit-max6675's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.