This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "color.h" | |
#include "utilities.h" | |
#include <math.h> | |
/* | |
* Algorithm adapted from https://gist.github.com/hdznrrd/656996. Uses a little libmath. | |
* */ | |
void color_HSV2RGB(struct color_ColorHSV const *hsv, struct color_ColorRGB *rgb) { | |
int i; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
// Uses https://github.com/PaulStoffregen/TimerOne for sending on a regular interval | |
#include <TimerOne.h> | |
// ECHO pin, needs to be a pin that supports interrupts! | |
#define ULTRASONIC_PIN_INPUT 2 | |
// TRIG pin, can be any output pin | |
#define ULTRASONIC_PIN_OUTPUT 3 | |
// update interval, make sure to keep it above 20ms | |
#define ULTRASONIC_TIMER_US 50000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Practice AJAX</title> | |
<script type="text/javascript"> | |
function do_ajax() { | |
var req = new XMLHttpRequest(); | |
var result = document.getElementById('result'); | |
req.onreadystatechange = function() | |
{ |