Skip to content

Instantly share code, notes, and snippets.

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 / 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;
@radames
radames / drawRobotArrowsBlink.pde
Created November 4, 2015 20:04
Draw with blink
@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 / 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
import ddf.minim.*;
import ddf.minim.ugens.*;
Minim minim;
AudioOutput out;
float posx;
float posy;
float incx = 10;
/*
programa no python
import serial
s = serial.Serial("/dev/tty.usbmodemfd121",19200)
//liga led botao
#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>
// called this way, it uses the default address 0x40
// you can also call it with a different address you want
Adafruit_PWMServoDriver servo1 = Adafruit_PWMServoDriver(0x40);
Adafruit_PWMServoDriver servo2 = Adafruit_PWMServoDriver(0x42);
Adafruit_PWMServoDriver light1 = Adafruit_PWMServoDriver(0x43);
Adafruit_PWMServoDriver light2 = Adafruit_PWMServoDriver(0x44);

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 00F4 8FAC 27C4 481A 55AE ABFB A5A5 1E37 DF61 6F4D

To claim this, I am signing this object:

@radames
radames / acf_fields_to_rest_api.php
Created August 8, 2019 18:57
Simple Register ACF Field to Wordpress REST API / Add this code to functions.php
// add this to functions.php
//register acf fields to Wordpress API
//https://support.advancedcustomfields.com/forums/topic/json-rest-api-and-acf/
function acf_to_rest_api($response, $post, $request) {
if (!function_exists('get_fields')) return $response;
if (isset($post)) {
$acf = get_fields($post->id);
$response->data['acf'] = $acf;