This file contains hidden or 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
/** | |
* Problem definition: https://github.com/mikehadlow/Journeys | |
* Edit and run this code here: https://pl.kotl.in/_TytttU28 | |
*/ | |
package com.tomkuhn.journey | |
import com.tomkuhn.journey.Direction.* | |
enum class Direction { North, East, South, West } |
This file contains hidden or 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
var SerialPort = require('serialport'); | |
var port = new SerialPort('COM4', function (err) { | |
if (err) { | |
return console.log('Error: ', err.message); | |
} | |
}); | |
port.on('data', function (data) { | |
// general debug function: print serial data | |
console.log('Data:', data.toString()); |
This file contains hidden or 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 <Servo.h> | |
Servo myservo; // create servo object to control a servo | |
// twelve servo objects can be created on most boards | |
int pos = 90; // variable to store the servo position | |
int resetPos= 100; | |
int maxPos = 150; | |
int minPos=50; |