Show Posts
Pages: 1 2 [3] 4 5 ... 9
31  Forum 2005-2010 (read only) / Exhibition / Re: NTSC video out library on: May 23, 2010, 03:42:32 pm
Adding sound to this library would be incredible. I'm almost done with the simple rendering of shapes and will post that here when I'm done. With sound though, I definitely would go for a pong remake smiley
32  Forum 2005-2010 (read only) / Exhibition / Re: NTSC video out library on: May 17, 2010, 11:53:59 am
I think it's fast enough as well, basic with it being black and white but fun enough. Just a couple of pots for the pong controls, it's about the simplest game that can be made. I haven't seen any specs for old machines but those were marvels of the time with people building them from the ground up on just transistor logic and the likes.

I think Asteroids might be a step too far but maybe worth a shot at some point if I find the time (which I doubt!)
33  Forum 2005-2010 (read only) / Exhibition / Re: NTSC video out library on: May 17, 2010, 11:37:23 am
Just for fun I've been wondering if this library and the arduino is fast enough to recreate Pong...
34  Forum 2005-2010 (read only) / Exhibition / Re: NTSC video out library on: May 16, 2010, 06:00:48 am
If you think they work well you can add them in. I'm more interested in the rendering simple shapes than anything else. I've been working on rounded rectangles today, got it going apart from the filling but that's simple enough.

I don't think there's much else to do:

rectangles straight/rounded (might add in 3d boxes)
circles (might add for ellipses)
progressbars

Might do radio buttons, checkboxes, polygons perhaps. I don't think much more is needed for a simple display like this


Here's an example of box drawing at the moment, probably to have a 3d switch at the end of it too by the time I'm finished.

//draw_box(x start, y start,x length, y height, colour , fill, rounded radius);
    TV.draw_box(20,20,40,30,1,3,0);



After I've got these up and running I'll have to clean up some of the code for efficiency and cleanliness, that's the part I'm keen to get done, some of it now is quite short and simple, others needs a little work. That and looking out for out of bounds errors fully to protect the user. But apart from that it's nearly there.

All of this is to have some fun with algorithms really, (Bresenham's) midpoint circle algorithm is amazing in how it works so well.
35  Forum 2005-2010 (read only) / Exhibition / Re: NTSC video out library on: May 15, 2010, 04:51:45 pm
I'm loving being able to output to a tv so easily. I hope you don't mind that I've been adding to what you've given us so far with a few simple graphics functions, draw boxes, draw circles and draw progressbars.

The boxes can be filled/unfilled/inverted as can the circles and the progressbars can be white on black, black on white and sectioned bars.

Here's what I've got going so far, the eventual goal is to make on screen displays easy to set up with boxes and text etc easily:

[media]http://www.youtube.com/watch?v=CSrT1Mek-N0[/media]

Not terribly complex but it's a way for me to learn more C.
36  Forum 2005-2010 (read only) / Exhibition / Re: NTSC video out library on: May 10, 2010, 09:26:48 am
I have a question about the resistors used. How far away from 1k ohm and 330 ohm can they be and they still work? Just wondering what tolerances are needed? I don't want to blow up my tv smiley
37  Forum 2005-2010 (read only) / Exhibition / Re: NTSC video out library on: May 04, 2010, 04:08:13 pm
This may be a simplistic question but is there a way to output colour at all, or possible with a future version, or is this beyond the scope of the arduino?
38  Forum 2005-2010 (read only) / Exhibition / Re: WiFi Tank on: October 24, 2010, 07:49:15 am
Awesome project.
39  Forum 2005-2010 (read only) / Exhibition / Arduino Pumpkin Lights on: October 30, 2010, 10:56:30 am
Ok, I decided to make some LED's to go in a pumpkin this year. Here's the code for it:

Code:
/*
  Pumpkin LED Lights
 
 This sketch controls 6 LEDs connected to the 6
 PWM pins
 
 1&2 are Green
 3&4 are Yellow
 5&6 are Red
 
 */

int ledPin1 =  3;    // LED connected to digital pin
int ledPin2 =  5;    // LED connected to digital pin
int ledPin3 =  6;    // LED connected to digital pin
int ledPin4 =  9;    // LED connected to digital pin
int ledPin5 =  10;    // LED connected to digital pin
int ledPin6 =  11;    // LED connected to digital pin

// The setup() method runs once, when the sketch starts
void setup()   {                
  // initialize the digital pin as an output:
  pinMode(ledPin1, OUTPUT);
  pinMode(ledPin2, OUTPUT);
  pinMode(ledPin3, OUTPUT);
  pinMode(ledPin4, OUTPUT);
  pinMode(ledPin5, OUTPUT);
  pinMode(ledPin6, OUTPUT);  
  randomSeed(analogRead(0));

}

// the loop() method runs over and over again,
// as long as the Arduino has power

void loop()      
{
  Flicker(random(1,4),random(2,200)); // might be a long flicker
  Glow(random(1,4),random(5,40),random(2,30));
  Flicker(random(1,4),random(200,800));   // long flicker
}
int Flicker(int col, int del){

  unsigned long currentMillis = millis();
  unsigned long startMillis = currentMillis;


  do
  {


    if (col == 1) {

      analogWrite(ledPin1, random(0, 255));
      delay(10);
      analogWrite(ledPin2, random(0, 255));
      delay(10);
    }
    if (col == 2) {

      analogWrite(ledPin3, random(0, 255));
      delay(10);
      analogWrite(ledPin4, random(0, 255));
      delay(10);
    }
    if (col == 3) {

      analogWrite(ledPin5, random(0, 255));
      delay(10);
      analogWrite(ledPin6, random(0, 255));
      delay(10);
    }
    unsigned long currentMillis = millis();

  }
  while (millis() < (startMillis + (del * 1000)));



  analogWrite(ledPin1, 0);
  analogWrite(ledPin2, 0);
  analogWrite(ledPin3, 0);
  analogWrite(ledPin4, 0);
  analogWrite(ledPin5, 0);
  analogWrite(ledPin6, 0);





}


int Glow(int col, int cycles, int del){

  if (col == 1) {
    for (int u=1; u <= cycles; u++){

      for (int i=0; i <= 250; i = i + 4){
        analogWrite(ledPin1, i);
        analogWrite(ledPin2, i);
        delay(del);
      }

      for (int i=0; i <= 250; i = i + 4){
        analogWrite(ledPin1, 255-i);
        analogWrite(ledPin2, 255-i);
        delay(del);
      }


    }
  }
  analogWrite(ledPin1, 0);
  analogWrite(ledPin2, 0);
  if (col == 2) {
    for (int u=1; u <= cycles; u++){

      for (int i=0; i <= 250; i = i + 4){
        analogWrite(ledPin3, i);
        analogWrite(ledPin4, i);
        delay(del);
      }

      for (int i=0; i <= 250; i = i + 4){
        analogWrite(ledPin3, 255-i);
        analogWrite(ledPin4, 255-i);
        delay(del);
      }


    }
  }
  analogWrite(ledPin3, 0);
  analogWrite(ledPin4, 0);
  if (col == 3) {
    for (int u=1; u <= cycles; u++){

      for (int i=0; i <= 250; i = i + 4){
        analogWrite(ledPin5, i);
        analogWrite(ledPin6, i);
        delay(del);
      }

      for (int i=0; i <= 250; i = i + 4){
        analogWrite(ledPin5, 255-i);
        analogWrite(ledPin6, 255-i);
        delay(del);
      }


    }
  }



  analogWrite(ledPin1, 0);
  analogWrite(ledPin2, 0);
  analogWrite(ledPin3, 0);
  analogWrite(ledPin4, 0);
  analogWrite(ledPin5, 0);
  analogWrite(ledPin6, 0);

}



The basic setup is 6 LED's on the PWM pins, grouped in two's, so LEDs 1&2 are both green, 3&4 are yellow and 5&6 are red. It just goes through some basic effects. I could have done more but this is good enough for now.



40  Forum 2005-2010 (read only) / Exhibition / Re: Solid State Tesla coil on: June 29, 2010, 03:09:12 pm
I'll just add weight to the side of correct science vs pseudoscience. The above is nonsense.

No one is extracting or using useful zero-point energy, except in half life 2.
41  Forum 2005-2010 (read only) / Exhibition / Re: quick & easy geiger counter integrator on: June 14, 2010, 03:09:34 pm
If you want a smaller and hotter source then carefully take apart a smoke detector. The Am241 fleck inside it should give an alpha count of about 15000 cpm. Careful with it though, don't drop it and lose it - it's quite small, housed in a metal container, and keep it in a secure place of course.
42  Forum 2005-2010 (read only) / Exhibition / Quick programmer of external stripboard arduino's on: June 04, 2010, 11:37:38 am
I've built a few projects using stripboard, obviously without usb or serial circuitry. I started programming them by removing the chip and swapping out the chip on my duemilanove, but this is a less than perfect solution. I've bent a pin off one 328 like this, and while cheap they aren't free.

So I've come up with this as a solution. A switch on the rx pin of a dil socket. Closed and the arduino works as normal, but open and the 328 chip in the duemilanove can't receive serial commands.

So to use this as a simple programmer, connect ground to ground, reset to reset, tx to tx and rx to rx from the duemilanove to the target. I'd say connect VCC to VCC but I'm just powering the target from it's own source.

Then opening up the switch and  uploading a sketch uploads to the external chip instead. Seems to work fine and I don't have to take any chips out of anywhere to do it.

Heres a pic of it, BTW I don't need the double decker dil socket there, it's just the one that's modified.

43  Forum 2005-2010 (read only) / Exhibition / Re: Alphabet for writing to TV (very small code) on: May 27, 2010, 07:38:07 am
I saw this earlier and thought someone should make an oversized, nicer font for the tvout library as well as regular, if it will fit. The library seems to be expanding quickly with additions at the moment.
44  Forum 2005-2010 (read only) / Exhibition / Re: Mindmap for new project asking the status of BiLED on: April 17, 2010, 01:31:59 pm
2 light dependent resistors with a green / red filter on them to detect the 2 colours independently.
45  Forum 2005-2010 (read only) / Exhibition / Re: NTSC signal with Arduino and Miku H@chuNe on: March 24, 2010, 04:37:23 pm
Yeah, a video shield controlled via serial somehow would be a great addition to the arsenal.
Pages: 1 2 [3] 4 5 ... 9