dorkhub

avr-ds18b20

AVR library for controlling DS18B20 temperature sensors

Jacajack
C6324 forksMITupdated 5 years ago
git clone https://github.com/Jacajack/avr-ds18b20.gitJacajack/avr-ds18b20

avr-ds18b20

The MIT License Travis CI

avr-ds18b20 is an AVR library for controlling DS18B20 temperature sensors. It can be easily compiled for every micro-controller supported by avr-gcc.

Usage example

#include <avr/io.h>
#include <util/delay.h>
#include <stdio.h>

#include <ds18b20/ds18b20.h>

int main( )
{
	int temp;

	while ( 1 )
	{
		//Start conversion (without ROM matching)
		ds18b20convert( &PORTB, &DDRB, &PINB, ( 1 << 0 ), NULL );

		//Delay (sensor needs time to perform conversion)
		_delay_ms( 1000 );

		//Read temperature (without ROM matching)
		ds18b20read( &PORTB, &DDRB, &PINB, ( 1 << 0 ), NULL, &temp );

		//Somehow use data stored in `temp` variable
	}

	return 0;
}

For more information visit wiki.

more like this

ML-MCU

Code for IoT Journal paper 'ML-MCU: A Framework to Train ML Classifiers on MCU-based IoT Edge Devices'

C51

yaos

An embedded operating system for ARM Cortex-M based microcontrollers

C51

ProbeHunter

An ESP8266 based promiscuous WiFi sniffer to track devices emitting probe requests

C52

search

search projects, people, and tags