TellyMate Shield - TV output for Arduino

@Retro, I get it now! Just took some reading.. (and paying attention!:D) Haha, I'm just having too much fun with this!

I know it's not all that "cool" if you will, but I've been using a 433MHz RF kit to make it a wireless setup. It's really simple too! You can just use the VirtualWire examples, and edit the Receiver take away the spaces that are added, and make sure it's not outputting HEX values. Also, you can take away the "Got:" because that's just annoying when it prints everytime. :slight_smile:

Transmitter:

// transmitter.pde
//
// Simple example of how to use VirtualWire to transmit messages
// Implements a simplex (one-way) transmitter with an TX-C1 module
//
// See VirtualWire.h for detailed API docs
// Author: Mike McCauley (mikem@open.com.au)
// Copyright (C) 2008 Mike McCauley
// $Id: transmitter.pde,v 1.3 2009/03/30 00:07:24 mikem Exp $
#include <Button.h>
#include <VirtualWire.h>

// \x1B is the CHAR_ESC(basically a command character) in TellyMate, not used because I need command chars
// and text, without any spaces in between, easier to include as a command.
// 
#define CHAR_ESC "\x1B"   


char buffer[32];
unsigned long int runTime;
long myVal;


const char *CLR = "\x1B""E";  // this will clear the screen
const char *bigText = "\x1B""_2""HELLO WORLD!";  // 1st part of bigText
const char *bigText2 = "\x1B""_3""HELLO WORLD!"; // 2nd part, needs 2 for big text, top/bottom
const char *STAT = "\x1B""Q"; // this will display the jumper stats

Button b1 = Button(9, PULLUP);
Button b2 = Button(8, PULLUP);
Button b3 = Button(7, PULLUP);
Button b4 = Button(6, PULLUP);

void setup()
{
  Serial.begin(9600);        // Debugging only
  Serial.println("setup");

  // Initialise the IO and ISR
  vw_set_ptt_inverted(true); // Required for DR3100
  vw_setup(2000);       // Bits per sec
}

void loop()
{


  if(b1.isPressed()){
    digitalWrite(13, true); // Flash a light to show transmitting
    myVal = analogRead(0);
    sprintf(buffer,"\x1B""_1""analogValue = %u", myVal); // _1 = single heighth, double width text

    vw_send((uint8_t *)buffer, strlen(buffer));
    vw_wait_tx(); // Wait until the whole message is gone
    digitalWrite(13, false);
  }

  if(b2.isPressed()){
    digitalWrite(13, true); // Flash a light to show transmitting
    vw_send((uint8_t *)CLR, strlen(CLR));
    vw_wait_tx(); // Wait until the whole message is gone
    digitalWrite(13, false);
  }
  
  if(b3.isPressed()){
    digitalWrite(13, true); // Flash a light to show transmitting
    vw_send((uint8_t *)bigText, strlen(bigText));
    vw_wait_tx();
    vw_send((uint8_t *)bigText2, strlen(bigText2));
    vw_wait_tx(); // Wait until the whole message is gone
    digitalWrite(13, false);
  }
  
  if(b4.isPressed()){
    digitalWrite(13, true); // Flash a light to show transmitting
    vw_send((uint8_t *)STAT, strlen(STAT));
    vw_wait_tx(); // Wait until the whole message is gone
    digitalWrite(13, false);
    delay(500);
  }

}

Here's the receiving End.. it's the Receiver Example for VirtualWire, minus just a couple lines of code:

// receiver.pde
//
// Simple example of how to use VirtualWire to receive messages
// Implements a simplex (one-way) receiver with an Rx-B1 module
//
// See VirtualWire.h for detailed API docs
// Author: Mike McCauley (mikem@open.com.au)
// Copyright (C) 2008 Mike McCauley
// $Id: receiver.pde,v 1.3 2009/03/30 00:07:24 mikem Exp $

#include <VirtualWire.h>

void setup()
{
    Serial.begin(57600);      // 57600 for TellyMate baud.
    Serial.println("setup");

    // Initialise the IO and ISR
    vw_set_ptt_inverted(true); // Required for DR3100
    vw_setup(2000);       // Bits per sec

    vw_rx_start();       // Start the receiver PLL running
}

void loop()
{
    uint8_t buf[VW_MAX_MESSAGE_LEN];
    uint8_t buflen = VW_MAX_MESSAGE_LEN;

    if (vw_get_message(buf, &buflen)) // Non-blocking
    {
      int i;

        digitalWrite(13, true); // Flash a light to show received good message
      // Message with a good checksum received, dump it.
      
      for (i = 0; i < buflen; i++)
      {
          Serial.print(buf[i]);
      }
      Serial.println("");
        digitalWrite(13, false);
    }
}