Skip to content

Instantly share code, notes, and snippets.

View jarryDk's full-sized avatar

Michael Bornholdt Nielsen jarryDk

View GitHub Profile
#include <Servo.h>
Servo myServo;
int const potPin = A0;
int potVal;
int angle;
void setup() {
myServo.attach(9);
const int greenLEDPin = 9;
const int redLEDPin = 11;
const int blueLEDPin = 10;
const int redSensorPin = A0;
const int greenSensorPin = A1;
const int blueSensorPin = A2;
int redValue = 0;
int greenValue = 0;
const int sensorPin = A0;
const float baselineTemp = 25.0;
void setup(){
Serial.begin(9600); // open a serial port
for(int pinNumber = 2; pinNumber<5; pinNumber++){
pinMode(pinNumber,OUTPUT);
digitalWrite(pinNumber, LOW);
}
}
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
/**
* License : Apache License 2.0
*
* @author Michael Bornholdt Nielsen [email protected]
*
*/
public class PrettyPrintedJson {
import java.io.IOException;
import java.util.ArrayList;
import java.util.Map;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientRequestFilter;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.WebTarget;