Skip to content

Instantly share code, notes, and snippets.

/*
programa no python
import serial
s = serial.Serial("/dev/tty.usbmodemfd121",19200)
//liga led botao

Keybase proof

I hereby claim:

  • I am radames on github.
  • I am radames (https://keybase.io/radames) on keybase.
  • I have a public key whose fingerprint is 3158 E138 C95E 4847 A39F D5A8 871E 4EF0 D752 85CA

To claim this, I am signing this object:

@radames
radames / drawRobot.pde
Created November 4, 2015 18:21
Just a sketch template with function
void setup() {
size(800, 500);
frameRate(24);
}
void draw() {
background(255);
drawRobot(1, 50,50); //calling the function with fixed parameters
@radames
radames / drawRobotArrows.pde
Created November 4, 2015 19:27
testing arrows to move the robot and checking the canvas area
float posx;
float posy;
float scaleValue = 1;
color backColor;
void setup() {
size(800, 500);
frameRate(24);
posx = random(0, width);
posy = random(0, height);
@radames
radames / drawRobotArrowsBlink.pde
Created November 4, 2015 20:04
Draw with blink
@radames
radames / robotPonginProgress.pde
Last active November 11, 2015 19:02
starting the pong from this template
float posx;
float posy;
float incx = 5;
float incy = 5;
//cointains the pad position and width and height
float posXPad, posYPad;
float padW, padH;
import ddf.minim.*;
import ddf.minim.ugens.*;
Minim minim;
AudioOutput out;
float posx;
float posy;
float incx = 10;
@radames
radames / Planet_Kronos_x8.ino
Last active June 25, 2022 13:56
Sample code for controlling a motor via OSC messages using Arduino and Ethernet Shield
//Planet_Kronos_x8 The Kazimier Dezember 2015
//The MIT License (MIT)
#include <SPI.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
#include <OSCBundle.h>
#define DEBUG 1
@radames
radames / opencv_video_to_pygame.py
Last active April 17, 2023 15:34
OpenCV VideoCapture running on PyGame - repo ref https://github.com/radames/opencv_video_to_pygame
from pygame.locals import KEYDOWN, K_ESCAPE, K_q
import pygame
import cv2
import sys
camera = cv2.VideoCapture(1)
pygame.init()
pygame.display.set_caption("OpenCV camera stream on Pygame")
screen = pygame.display.set_mode([1280, 720])
@radames
radames / opencv_video_to_pygame_raspberry_pi.py
Last active August 11, 2022 17:55
OpenCV VideoCapture running on PyGame on Raspberry PI
import pygame
from pygame.locals import *
import cv2
import numpy as np
import time
import picamera
import picamera.array
screen_width = 640