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
/* | |
Controlling a servo position using a potentiometer (variable resistor) | |
by Michal Rinott <http://people.interaction-ivrea.it/m.rinott> | |
modified on 8 Nov 2013 | |
by Scott Fitzgerald | |
http://arduino.cc/en/Tutorial/Knob | |
*/ | |
// la control la pornire trebe duty cicle sub 6% | |
/*** |
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
//Write a class called MinMaxPrinter. Using a Scanner, ask the user to enter | |
//a series of integers and find the maximum and the minimum value. | |
//Use a loop. | |
//Do not let bad input (a non-integer) terminate your program with an error. | |
//When the user enters any non-integer, print the maximum and minimun values | |
//on separate line and quit. | |
//If the numbers entered are 5 10 3 8 1, 2 9, the output will be |
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
/* | |
Controlling a servo position using a potentiometer (variable resistor) | |
by Michal Rinott <http://people.interaction-ivrea.it/m.rinott> | |
modified on 8 Nov 2013 | |
by Scott Fitzgerald | |
http://arduino.cc/en/Tutorial/Knob | |
*/ | |
// la control la pornire trebe duty cicle sub 6% | |
/*** |
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
/* | |
Controlling a servo position using a potentiometer (variable resistor) | |
by Michal Rinott <http://people.interaction-ivrea.it/m.rinott> | |
modified on 8 Nov 2013 | |
by Scott Fitzgerald | |
http://arduino.cc/en/Tutorial/Knob | |
*/ | |
// la control la pornire trebe duty cicle sub 6% | |
/*** |
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
/* | |
Folosim un Potentiometru pentru a simula throthle -ul de pe telecomanda legat la JR connector | |
ESC NOU SE PORNESTE CU PWM MARE SI CU DE AKA NUC | |
*/ | |
#include <Servo.h> | |
Servo myServo; // create servo object to control a servo |
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
/* | |
Folosim un Potentiometru pentru a simula throthle -ul de pe telecomanda legat la JR connector | |
ESC NOU SE PORNESTE CU PWM MARE SI DUPA MIC | |
*/ | |
#include <Servo.h> |
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 <Wire.h> | |
#define SLAVE_ADDRESS 0x04 | |
int number = 0; | |
int state = 0; | |
//ENCODER PART------------------ | |
unsigned long timp1, timp2; | |
float frecventa; | |
//PINS |
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
//PINS | |
int outputPinAnalog = 11; | |
int interuptPin = 3; | |
//VALUES | |
unsigned long timp1, timp2; | |
float frecventa; | |
int motorValue = 125;//jumatate din viteza | |
void setup() |
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
int main(void) | |
{ | |
//Variables | |
zmq::context_t *ctx; | |
zmq::socket_t *subSocket; | |
//Initialise context and connect | |
ctx = new zmq::context_t(1); | |
std::string addr = "tcp://127.0.0.1:"; | |
std::string req_port = "5555"; |
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
typedef struct center { | |
center() : x(0), y(0), z(0) {} | |
int x; | |
int y; | |
int z; | |
MSGPACK_DEFINE(x, y, z); | |
}; | |
typedef struct normal { |
OlderNewer