smaffer / vgax Goto Github PK
View Code? Open in Web Editor NEWVGA library for Arduino UNO
VGA library for Arduino UNO
In lines 121 and 122 the BitFont example uses the print() method. This does no longer exist and has to be replaced with printPROGMEM.
Hi, i'm using this library with my Arduino Uno for my Homemade Computer project. Can i increase screen resolution with converting this library to monochrome? Black and white enough for me, i just need to increase screen resolution.
//Edit: I wrote increase wrong, I saw it now.
Is there any possibility to develop the same library for the Arduino Giga?
In my test, red need to connect 7 and green is 6....
So im working on a uno driven console and had a few questions as im fairly new to this.
First: what are the 68ohm resistors for? are they for V-sync? would getting them closer in value make images less glitchy?
Second: can i set a custom resolution? like pixel by pixel? also you say you could center the image but lose audio, if i dont care about audio how would i center it?
Third: does the resistance on the RGB pins affect the color at all? id Love to add some potentiometers to the pins if it does
Thank you ahead of time anyone who can help me
Edited this cause i posted it in the wrong github
Hey, I got problem with memory on Uno. Global variables uses 7215 byte of memory when max is 2kB. I just include library with no writing code. Did someone found this issue earlier?
Very nice, thanks for sharing, seems to compile also on the Nano which made it possible to use it as a little VGA driver (via for example I2C interface) for an another Arduino.
Design comment: The bitmaps uses four bytes for each pixel. Because you have only four colors, why you didn''t designed it to use color numbers that reffers to a palette like GIF's (or other <=256 color bitmaps) do. So you need just one byte for each pixel and saves you 3x times the required flash memory, for example:
0 : Black
1 : Color #1
2: Color #2
3: Color #3
4: Color #4
You can also squeeze 2 pixels in one byte. The first four bits specify the color of the first pixel and the last bits specify the color of the second pixel. This halfs the required space, for example (bin format):
1000 : This selects color #1 for pixel one
0001 : This selects color #4 for pixel two
So in the array, it looks something like this: B10000001, which is just one byte = 129 or 0x81 hex. Hex notation makes the code a bit smalller ofcourse.
Because this all saves space, maybe there is room to apply chaching to avoid the flicker. The cache can be build the same like the bitmaps, so it requires less memory and the timer draws the cache continuously in background. So when you manipulate the output by drawing a pixel, you draw in cache instead of draw it directly. You also can 'move' portions directly in memory without any translation required which makes it as fast as possible.
Idea?
Problem: Horisontal artifacts are seen when running the randompixels example if compiled with Platform.IO installed on VS:Code
Steps:
[env:uno]
platform = atmelavr
board = uno
framework = arduino
lib_extra_dirs = ;~/Documents/Arduino/libraries, C:\Program Files (x86)\Arduino\libraries
lib_deps = smaffer/VGAX @ 1.2.0
Expected:
The picture is without artifacts as when compiled in Arduino IDE 1.8.13
Actual:
Horisontal artifacts are seen when compiled in VS:Code with Platform.IO
Hello! I was wondering if this was possible as I have 10 of these chips laying around in my workbench
I don't necessarily expect a fix for this to be implemented in the library, but I just wanted to report that this was really easy to get set up, but I did experience a visual glitch I was able to isolate to the audio signal.
This small change to the example to disable the tone generation got me a stable picture. Might be worth mentioning as a potential debugging step if others might run into the same trouble and aren't concerned about running audio. I am working with a clone of the MEGA 2560 from ELEGOO.
void loop() {
static unsigned cnt;
if (!(cnt % 10))
vga.noTone();
// add this line
cnt++;
//if (!(cnt++%20)) <--- comment out these two lines
// vga.tone(cnt*10+11); <--- but you still need to increment cnt if you want the picture to change
if (cnt>=160)
cnt=0;
I'm assuming you meant this library to be opensource and to be used by other people.
However, since you currently do not have a license file, no one is legally allowed to use this library except for yourself.
Could you please add a license file?
Hi,
if you draw a rectangle with width 1 and height 1, you get a rectangle with width 2 and height 2 and so on.
Many greetings
Hello if i want to print very small size Dot(".") than what i have to do?
Right now i use your code and setup it's nice, but i can not print simple smaller size of Dot in Screen.
When I leave the const
when creating a string, so that I can change it later, it gives me the error variable 'str1' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
I'm referring to the BitFont example.
Hello,
I've been running the examples you made on the Arduino Mega and I noticed that the framerate was a lot slower than the example videos you posted. Also there seems to be some flicker. I'm just running the example code as is at 120x90.
Here are some videos
mario sprites
scrolling text
Hi,
when I was testing your library on Atmega 328 (VGAX), everything was fine.
But testing it on ESP-07, not NodeMCU, i've changed pins from D7, D2 etc. to GPIO pins (just 13, 5 etc.)
I think you should make 2 versions of library, of define board type in vga.begin(board);
Not advanced users won't know wheres problem.
Anyway, I'm writing an tutorial with using your library :)
Is ATmega2560 supported?
I can't seem to make it work, triple checked the wiring, is there something i need to change in the lib maybe?
It does compile and upload just fine but the monitor doesn't detect any signal.
Thanks!
Hello! Thank you for amazing library! My question: Is it possible to put your example code in ATMega8 ? (I have a clone of TL866 prog-r). I would like to make a simple VGA monitor tester. Could you help me?
Hello, I'm a art student spatial design from the Netherlands and I've been playing around with your library.
I wonder if there's any way I could change the aspect ratio of the displayed images?
I get it that memory on the Uno Is limited, so a higher resolution won't be possible.
But I'm left with 2 black bars and I can't seem to fix it myself. :(
Hello,
at the moment I'm playing around with your library and would like to use it for generating geometrical pixel art with the TVOut utils. Would it actually be possible to get a higher resolution (800x600) and therefore leave the colour?
Greetings,
Himi
can i use Arduino MEGA with VGAX library to get more resoultion ?
resoultion more than 120×60 pixel
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.