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
unsigned int i = 0; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
char buffer[50]; | |
sprintf(buffer, "the current value is %d", i++); | |
Serial.println(buffer); |
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
// --------------------------------------------------------------------------- Motors | |
// These are the pins to the the motor drive chip for the left wheel | |
int motor_left[] = {12, 13}; | |
// These are the pins to the the motor drive chip for the right wheel | |
int motor_right[] = {6, 7}; | |
// --------------------------------------------------------------------------- Setup | |
void setup() { | |
Serial.begin(9600); |
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
lab for binary teaching | |
-arduino code (for test) | |
-processing (adaoed from fabacademy Fabio Paradiso) | |
-processing version (my version) | |
-python version with Tkinter | |
-p5js version |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/python | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
from time import gmtime, strftime | |
import sys,random,socket | |
PORT_NUMBER = 8000 | |
HOSTNAME = socket.gethostname() | |
if len(sys.argv) > 1: |
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 <iostream> | |
#include <string.h> | |
class splitter { | |
private: | |
char *_del; | |
char *_str; //=new char[20]; | |
bool _first; | |
char *_tok; |
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
/********************************************************************* | |
sinbrive april 2020 | |
File Decription: Finite State Machine general framework | |
*********************************************************************/ | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
class transition { |
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 "fsm.h" | |
Traffic traffic(2, 4, 5, 8, 10, 12); // no constraint about the digital outputs | |
void setup() { | |
Serial.begin(9600); | |
} | |
String str = ""; |
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 <iostream> | |
using namespace std; | |
void convertirDec(); | |
void convertirBin(); | |
void convertirHex(); | |
int char2int (char); | |
char hexa_A [] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; |
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 <iostream> | |
#include <cmath> | |
//#include <string> | |
using namespace std; | |
char hexa [] = {'0','1','2','3','4','5','6', \ | |
'7','8','9','A','B','C','D','E','F'}; | |
unsigned char poids[] = {1,2,4,8,16,32,64,128}; |
OlderNewer