sms display on monitor via VGA output

I try to connect Arduino mega2560 and Arduino gsm together. what i want to do is display the sms receive on the gsm modem to the pc monitor via VGA output? can someone help me?

how do i edit the code from here?

You better use two Arduino boards. One special for the VGA output.

can i know the reason why it will be easier to use 2 arduino board?

The VGA signal requires almost everything from the Arduino, and it uses the serial port. There is not much left to do with it. The code by Nick Gammon makes an Arduino a I2C device.

if there any way to do it as i only have 1 arduino mega 2560 and arduino gsm shield?

I don't think so. That code by Nick Gammon is written for the Arduino Uno (and other boards with the ATmega328p microcontroller).

Can you find a VGA output with the Arduino Mega 2560 board ?

This forum topic is about the Nick Gammon VGA on a Mega 2560.
http://forum.arduino.cc/index.php?topic=133306.0
It was working after a few changes, but the Mega 2560 was so busy with the VGA signal, there was not much it could do.
But at least that is the one thing I found that a VGA output worked on a Mega2560.

This TVout library is also for the Mega 2560 : Arduino Playground - TVout
But that outputs a PAL or NTSC signal !

The gsm module amd the vga have the same pin in arduino uno right? Is there other ways that we can connect the arduino to lcd tv? Pls help.

Do you want run that VGA sketch on a Mega or Leonardo ?
That VGA sketch is written for an Uno. The Uno has the ATmega328p chip, which is the most common chip for Arduino projects, but the Mega and the Leonardo have other chips.

I modified the sketch for the Arduino Mega and its work. I'm going to plug Arduino GSM shield on Leonardo, it will receive the message and send to the Arduino Mega so that the message can be display on the monitor via VGA. How can i do that?

I will be using this http://arduino.cc/en/Tutorial/GSMExamplesReceiveSMS as the receiving SMS part.....

You adapted the VGA for the Mega ? Good job!

Get the Leonardo working with the GSM shield.

The GSM shield uses a software serial port on pin 2 and 3. That means it is the same for the Leonardo or the Uno or the Mega. Use that example in your link to get it working.

To make the Leonardo communicate via I2C, remove the GSM shield.
Connect the SDA, SCL and GND of the Leonardo and Mega (SDA to SDA, SCL to SCL, GND to GND).

When you want to know about I2C between two Arduino boards, these are two examples:

On the page of Nick Gammon : http://www.gammon.com.au/forum/?id=11608
Find the section : Communicating with the VGA sketch
You see an "Example sending sketch".
It all comes down to this:

  Wire.beginTransmission (i2cAddress);
  Wire.write (s);
  Wire.endTransmission ();

When that is working, add the GSM shield and glue everything in the code together.

I upload the VGA communicating sketch to Arduino Mega 2560 and sending sketch to Leonardo........

However, the monitor only shows

sprintf (message , "Line %03i - hello!", i) which is written in the VGA communicating sketch
*and it wont continue to *
sendString (clearScreen);
sendString ("Hi there\n");
sendString ("Everyone\n"); which is written in the sending sketch
what is the problem occur?

In the Leonardo, you can check the return value of endTransmission() to see if there was an error.

You could run the i2c_scanner (it is in the Playground) on the Leonardo to see if the Mega is detected as a slave. But all the i2c_scanner does, is checking the return value of endTransmission().

When the i2c_scanner does not detect the Mega, check your wiring and the I2C part of the VGA sketch.

Did you use the first serial port on the Mega for the VGA output ? That serial port is also conneted to the usb-serial to the computer. Since the Mega has 4 serial ports, perhaps you could use one of the others.

There are Pro Mini clones on Ebay for 3 dollars. They have the ATmega328p chip and I assume they can run the VGA sketch as it is.

Everything iworks well for the i2C communication between leonardo and mega!!!

There is another problem when i combining the "sms receive" sketch and "sending" sketch. After i combine these 2 sketch, the gsm had initialized but it cant receive the incoming SMS.

I discover that the GSM shield uses pin 2 and pin 8 to communicate with leonardo. At the same time, we need leonardo pin 2 for the SDA as well. How can i solve this problem? Do we allow to change the TXPIN (from pin 2 to others pin) in GSM3SoftwareSerial.cpp file or we can only change the RXPIN.

GSM3SoftwareSerial.cpp

#elif defined(AVR_ATmega32U4)
#define TXPIN 3
#define RXPIN 8
#define RXINT 3
#endif

Those I2C pins ! I forgot they are on pin 2 and 3 for the Leonardo, I also forgot that the interrupt is different for the Leonardo.
The GSM shield is not very compatible with the Leonardo. It will probably be improved in the future. I even think that library has a few errors for the Leonardo.

The GSM shield has RX and TX hardwired to pin 2 and 3. It also uses pin 7 for a control signal.

There is actually a guide for it : http://arduino.cc/en/Guide/GSMShieldLeonardoMega
But that guide does not include the use of I2C.
I think you have to bend both RX and TX outside the pin header.

The definition for the Leonardo in the file GSM3SoftSerial is:
#define TXPIN 3
#define RXPIN 8
#define RXINT 3
But that is after the pin bending and rewiring of the bended RX pin to pin 8.

The TXPIN is set to pin 3 and RXINT to interrupt 3, I think that is an error in the GSM library.
It is the same for version 1.0.6 and 1.5.8. So no improvement.

Pin 9 is a good pin for TX.

So what to do with RXINT ?
The RXINT is used for the attachInterrupt and is not a pin number but the interrupt number. I think there is an error in the GSM library.
The RXINT is not used for the Uno board, since one of the PCINT interrupts are used.
So I suggest to disable the RXINT for the Leonardo, and use also one of the PCINT interrupts.

The reference for the Leonardo Pins: http://arduino.cc/en/Reference/softwareSerial
For RX : 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).
Perhaps you want to use the SPI bus later, so you can use 8 up to 11.

That is good, pin 8 is a PCINT pin.

To make it compatible with the Leonardo, and stay away from I2C and Serial1, we have now RX at pin 8, and TX at pin 9.
So you have to wire the bended pin 2 to 8 (as in the Guide), and and the bended pin 3 to 9.

You also have to change the library file GSM3SoftSerial.cpp
You have to remember to change that every time, when you update the Arduino IDE.

#elif defined(__AVR_ATmega32U4__)
// #define __TXPIN__ 3
// #define __RXPIN__ 8
// #define __RXINT__ 3
#define __TXPIN__ 9
#define __RXPIN__ 8
#define __RXINT__ 100
#endif

The RXINT set to 100 will disable it.
The RXPIN to 8 should use the PCINT interrupt. I don't know how to enable that. Is that automatically ? Give it a try. If it doesn't work, there is perhaps a difference between GSM3SoftSerial and the normal SoftwareSerial.

http://arduino.cc/en/Main/arduinoBoardLeonardo

I have started a topic about this here : Arduino GSM shield not compatible with Leonardo board. - Suggestions for the Arduino Project - Arduino Forum

Thanks a lot!!! It works now~ haha

I don't know why some unknown symbol will appear on the top of the monitor as shown in the picture i attach

Congratulations 8)
I don't know why those characters appear.

Is it possible for me to change the font size?

I think you want to much :astonished:
The font is a binary bunch of data in the sketch, it is the: byte screen_font [8] [256] PROGMEM ...
You don't want to rewrite that long list of numbers :~

Hello bro,
I have seen your thread on sms display on lcd monitor via vga. Presently I am working with arduino uno r3 and gsm module (sim 900A). I had successfully compiled the code from nick gammons forum and it works fine. and then i modified the code and added the gsm commands and other stuff(using the code to display messages from gsm module to 16x4 LCD) . It compiled well but it failed to display.
I think i have made something wrong with the code that includes message commands from gsm. Please help me with the coding thing.
Here is the sketch.Kindly guide me

screenFont.h (12.8 KB)

TimerHelpers.h (6.92 KB)

work.ino (10.5 KB)

oi boa noite a todos como faço para imprimir só texto não sei muito de programação e queria uma ajuda