Go Down

Topic: TellyMate Shield - TV output for Arduino (Read 26450 times) previous topic - next topic

CaptainObvious

I've got a single 168 as well, but help me understand this, if you don't mind. :D

I thought that when you'd want to use a new character set, no matter which chip you were using, you would have to upload the new characters? Or when you try to use certain chars in a certain way, do they appear as the other character set?

http://www.batsocks.co.uk/downloads/index_downloads.htm

The fontbanks, I noticed they're named differently.. but how do I go about including a different one with a .hex file?

Guess I'm really curious to, if I upload the extra fontbanks, can I use them separately? Say, one day, use it to debug characters and such. Then the next day, play the game of Life, with the different character bank, without uploading it. Or am I missing something here?

:)

retrolefty

I forget all the gory details, but I was able to figure it out from the products site, download page and some of the example programs.

For example, to get the game of life to work I needed to have a alternate font set loaded and that's when I saw what's going on. A 168 memory size can hold up to four font sets. You do have to run a seperate program on your standard Arduino board, four seperate times, loading a different character set each run until all four are loaded into the telly board, if you want all four.  Then you can cause font page switches via control codes sent to the telly board from your Arduino board's sketch.

As I said it's a bit fuzzy as it's been awhile, but it wasn't that hard once I read some of the comments in the various programs listed at the telly site.

Lefty

CaptainObvious

@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. :)

Transmitter:
Code: [Select]
// 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:
Code: [Select]

// 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);
   }
}

Shackscs

Got my Tellymate today!! ;D

Now to get a PS for my LCD display.

mattbrawn

Some of this coupled with a bit of coding could work a treat for a PUSH N900 submission...  ;D

P18F4550

Sorry, but im still in favour of MicroVGA-TEXT, 16 Colours 80x25 characters

westfw

Matt: the N900 already has video output; connecting by BT to an arduino to get similarly poor (NTSC) video seems overly complex; can the N900 video out be manipulated directly by N900 firmware, or is it tightly coupled to some sort of video/picture playback hardware?

(I think it'd be a neat hack to throw up some sort of hackable interface (BASIC, FORTH, BitLash, C64 emulator, whatever) on a big NTSC screen from the N900, but OTOH that pretty much has significantly lower resolution than the LCD, so perhaps not.)

retrolefty

Quote
Sorry, but im still in favour of MicroVGA-TEXT, 16 Colours 80x25 characters


That's a very nice product, I hope to get one some day. With all the extra keyboards and monitors I have stashed away, it's a pretty good value for what it does.
Keep in mind if using the NTSC or PAL TV output, that only black and white is supported.

Lefty

mattbrawn

#53
Feb 09, 2010, 10:06 am Last Edit: Feb 09, 2010, 10:08 am by mattbrawn Reason: 1
@westfw - I meant in terms of a submission for the PUSH N900 competition, running the TV output through an Arduino an N900 and making it do something different and cool.

Check out  blogs.nokia.com/pushn900/usa  

As for modification of the playback, I'm not entirely sure, I think it can be, just have to rewrite an application to manage how it's displayed.
Could be a nice submission and put you in with a chance to win $10,000 an a trip to Vegas. 8-)

cyberteque

I'm waiting for my TellyMate to arrive from LittleBird!

Can't wait!

I've written a LOT of VT52 games over the years, I still have a working VT-100 and a VT-132, so I'm pretty familiar with the escape codes.

Arduino Star Trek and Lunar Lander here we come!

:)

MakerMann

Wonder if i can use it for displaying back my data from wether sensors.

retrolefty

Quote
Wonder if i can use it for displaying back my data from wether sensors.


Well it is hardwired to utilize the hardware serial on pins 0 & 1, but other then that no reason you couldn't use it as your weather data display.

Lefty

liangnv

yes, good idea for me. i can use it and fix it by myself. :)

Go Up