Controle Remoto - TV-B-Gone Arduino


O projeto TV-B-Gone foi idealizado pela Adafruit e é vendido como um kit completo para montagem em casa, o objetivo é desligar qualquer TV  que esteja atrapalhando seu almoço ou leitura em lugares públicos.

No kit original o processador utilizado é o ATtiny85, mas o projeto foi portado para a IDE arduino e para o processador ATMega 328 por Ken Shirriff em seu blog (informações e códigos no link).

O esquema de montagem é bastante simples e eu fiz um pequeno esquema que está abaixo:


Este fim de semana me diverti bastante perturbando os amigos e o pessoal em casa, o led ir tem que ser forte, usei um de 8 mm (tirado de um controle remoto velho) para ter um alcance maior. No esquema do autor você vai ver que é sugerido o uso de transistors para controlar até uma série de leds em linha e aumentar muito o alcance.

O projeto pode ser montado com uma placa arduino UNO ou outras clones, eu resolvi montar uma arduino na breadboard pequena  para fazer um aparelho que pudesse esconder no bolso. A força vem de 3 pilhas AA ligadas diretamente na placa e colocadas em um container com liga e desliga incorporado. Não usei o botão de reset que tem no esquema acima. O bootloader foi carregado no chip usando o esquema arduino ISP.

.

TUIO E PROCESSING



Estive fazendo alguns experimentos com o processing e a biblioteca  TUIO, o tuio é um software que recnhece marcadores e tambem é usado para mesas multitoque. Para conhecer e baixar acesse http://www.tuio.org/.

No vídeo acima eu modifiquei o exemplo que vem com a biblioteca e criei um sketch com um fundo em jpg e duas imagens que são apresentadas na tela dependendo do marcador exibido na webcam.

Segue o código abaixo:

----------------------------------------------------------------------------------------
/*
    TUIO processing demo - part of the reacTIVision project
    http://reactivision.sourceforge.net/

Modificado por Miklos em 13/03/2011 - www.miklos.blog.br
*/

// we need to import the TUIO library
// and declare a TuioProcessing client variable
import TUIO.*;
TuioProcessing tuioClient;

// these are some helper variables which are used
// to create scalable graphical feedback
float cursor_size = 15;
float object_size = 120;
float table_size = 760;
float scale_factor = 1;
PFont font;
PImage bg;
PImage p0;
PImage p1;

void setup()
{
  
  size(800,600);
  bg = loadImage("fundo_teste.gif");
  p0 = loadImage("quad_teste.gif");
  p1 = loadImage("circ_teste.gif");
  
  //size(screen.width,screen.height);
 // size(640,480);
 // noStroke();
 // fill(0);
  
  loop();
  frameRate(30);
  //noLoop();
  
  hint(ENABLE_NATIVE_FONTS);
  font = createFont("Arial", 18);
  scale_factor = height/table_size;
  
  // we create an instance of the TuioProcessing client
  // since we add "this" class as an argument the TuioProcessing class expects
  // an implementation of the TUIO callback methods (see below)
  tuioClient  = new TuioProcessing(this);
}

// within the draw method we retrieve a Vector (List) of TuioObject and TuioCursor (polling)
// from the TuioProcessing client and then loop over both lists to draw the graphical feedback.
void draw()
{
  //background(255);
  background(bg);
  textFont(font,18*scale_factor);
  float obj_size = object_size*scale_factor; 
  float cur_size = cursor_size*scale_factor; 
   
  Vector tuioObjectList = tuioClient.getTuioObjects();
  for (int i=0;isize();i++) {
     TuioObject tobj = (TuioObject)tuioObjectList.elementAt(i);
      String simb = "" + tobj.getSymbolID();
     if( simb.equals("1") ){
     stroke(0);
     fill(0);
     pushMatrix();
     translate(tobj.getScreenX(width),tobj.getScreenY(height));
     rotate(tobj.getAngle());
    // rect(-obj_size/2,-obj_size/2,obj_size,obj_size);
     image(p0,-obj_size/2,-obj_size/2,obj_size,obj_size);
     popMatrix();
     fill(255);
     text(""+tobj.getSymbolID(), tobj.getScreenX(width), tobj.getScreenY(height));
     }
     if( simb.equals("2") ){
     stroke(0);
     fill(0);
     pushMatrix();
     translate(tobj.getScreenX(width),tobj.getScreenY(height));
     rotate(tobj.getAngle());
    // rect(-obj_size/2,-obj_size/2,obj_size,obj_size);
     image(p1,-obj_size/2,-obj_size/2,obj_size,obj_size);
     popMatrix();
     fill(255);
     text(""+tobj.getSymbolID(), tobj.getScreenX(width), tobj.getScreenY(height));
        } 
   }
/*  
   Vector tuioCursorList = tuioClient.getTuioCursors();
   for (int a=0;a
      TuioCursor tcur = (TuioCursor)tuioCursorList.elementAt(a);
      Vector pointList = tcur.getPath();
      
      if (pointList.size()>0) {
        stroke(0,0,255);
        TuioPoint start_point = (TuioPoint)pointList.firstElement();;
        for (int j=0;j
           TuioPoint end_point = (TuioPoint)pointList.elementAt(j);
           line(start_point.getScreenX(width),start_point.getScreenY(height),end_point.getScreenX(width),end_point.getScreenY(height));
           start_point = end_point;
        }
        
        stroke(192,192,192);
        fill(192,192,192);
        ellipse( tcur.getScreenX(width), tcur.getScreenY(height),cur_size,cur_size);
        fill(0);
        text(""+ tcur.getCursorID(),  tcur.getScreenX(width)-5,  tcur.getScreenY(height)+5);
      }
   }*/
   
}

// these callback methods are called whenever a TUIO event occurs

// called when an object is added to the scene
void addTuioObject(TuioObject tobj) {
  println("add object "+tobj.getSymbolID()+" ("+tobj.getSessionID()+") "+tobj.getX()+" "+tobj.getY()+" "+tobj.getAngle());
}

// called when an object is removed from the scene
void removeTuioObject(TuioObject tobj) {
  println("remove object "+tobj.getSymbolID()+" ("+tobj.getSessionID()+")");
}

// called when an object is moved
void updateTuioObject (TuioObject tobj) {
  println("update object "+tobj.getSymbolID()+" ("+tobj.getSessionID()+") "+tobj.getX()+" "+tobj.getY()+" "+tobj.getAngle()
          +" "+tobj.getMotionSpeed()+" "+tobj.getRotationSpeed()+" "+tobj.getMotionAccel()+" "+tobj.getRotationAccel());
}

// called when a cursor is added to the scene
void addTuioCursor(TuioCursor tcur) {
  println("add cursor "+tcur.getCursorID()+" ("+tcur.getSessionID()+ ") " +tcur.getX()+" "+tcur.getY());
}

// called when a cursor is moved
void updateTuioCursor (TuioCursor tcur) {
  println("update cursor "+tcur.getCursorID()+" ("+tcur.getSessionID()+ ") " +tcur.getX()+" "+tcur.getY()
          +" "+tcur.getMotionSpeed()+" "+tcur.getMotionAccel());
}

// called when a cursor is removed from the scene
void removeTuioCursor(TuioCursor tcur) {
  println("remove cursor "+tcur.getCursorID()+" ("+tcur.getSessionID()+")");
}

// called after each message bundle
// representing the end of an image frame
void refresh(TuioTime bundleTime) { 
  redraw();
}

-----------------------------------------------------------------------



TRICOPTERO COM WII MOTION - MULTIWII



Neste post estou iniciando as experiências com os multicópteros baseados na arduino. No vídeo acima e nas fotos está minha primeira tentativa, um tricóptero baseado na duemilenove e nos sensores do wii ( wii motion plus e nunchuck) o código é desenvolvido pela comunidade do site MultiWii e foi iniciado por Alexinparis no rcgroups.com. Foi a primeira tentativa e o primeiro acidente, vamos ver se consigo fazer ele voar de verdade...

FRAME DE MADEIRA E ALUMÍNIO




MECANISMO DE CONTROLE DE YAW





















CENTRO COM A PLACA E SENSORES


























O frame que eu fiz é bem caseiro mas estou animado pois está funcionando.... no início eu achei que era pesado e não ia voar mas como você pode ver no vídeo até levantou vôo ( e quase saiu pela janela). vou fazer novos vídeos dos testes de vôo e postar depois.

Internet of Things

LUX com arduino GPRS shield e sensor LDR.

/*
Graph: Feed 38642, Datastream lux
*/

Laboratórios, Lojas e Produtos

Blogs, Comunidades e Revistas