attiny85 libraries?

I am having trouble verifying this attiny85 frogger game. It says “font6x8AJ2.h: No such file or directory”. Im guessing I need the libraries for these games? I am following Electonoobs directions from YouTube. This is the video ATtiny85 Game Console PCB - Multiple Games - YouTube

When I try to go to https://bitbucket.org/tinusaur/ssd1306xled
to get the libraries, the link doesn’t work. Does anyone know a good link to get the attiny libraries needed for this game? This is the frogger game:

/*  2015 / 2016 / 2017
 *  Frogger game by Andy Jackson - Twitter @andyhighnumber
 *  
 *  Special thanks to @senkunmusahi, who created the artwork bitmaps in the game using https://www.riyas.org/2013/12/online-led-matrix-font-generator-with.html
 *  
 *  Inspired by http://webboggles.com/ and includes some code from the #AttinyArcade games on that site
 *  The code that does not fall under the licenses of sources listed below can be used non commercially with attribution.
 *  This software is supplied without warranty of any kind.
 *  
 *  Controls:
 *  On the standard AttinyArcade:
 *  LEFT and RIGHT buttons move the frog across 
 *  BOTH BOTTONS TOGETHER move the frog forwards
 *  
 *  HIGHLY RECOMMENDED:
 *  On custom hardware (see schematic in folder where you found this file) there is an additional button to move frog forward  
 *  
 *  Also, from standby....
 *  Press and hold left button to turn sound on and off
 *  Press and hold left button with the right button held to reset high score
 * 
 *  This sketch is using the screen control and font functions written by Neven Boyanov for the http://tinusaur.wordpress.com/ project
 *  Source code and font files available at: https://bitbucket.org/tinusaur/ssd1306xled
 *  **Note that this highly size-optimised version requires modified library functions (which are in this source code file) 
 *  and a modified font header
 * 
 *  Sleep code is based on this blog post by Matthew Little:
 *  http://www.re-innovation.co.uk/web12/index.php/en/blog-75/306-sleep-modes-on-attiny85
*/
#include <EEPROM.h>
#include "font6x8AJ2.h"
#include <avr/pgmspace.h>
#include <avr/sleep.h>
#include <avr/interrupt.h> // needed for the additional interrupt

The code for the game was too long and exceeds the 9000 character post limit so I just included the libraries it used in the message above but the whole code can be downloaded here.

I did some Internet archaeology using the Wayback Machine from archive.org and was able to find an archived version of that repository:
tinusaur / SSD1306xLED — Bitbucket

You can download it from this link:
https://web.archive.org/web/20200621212727/https://bitbucket.org/tinusaur/ssd1306xled/get/067db232d620.zip

Hello pert! I clicked on the second link and downloaded the zip file, but when I went to sketch, include library, add zip library I get this error message "specified folder/zip file does not contain a valid library".

spiderman288888:
I clicked on the second link and downloaded the zip file, but when I went to sketch, include library, add zip library I get this error message "specified folder/zip file does not contain a valid library".

The Arduino IDE's "Add .ZIP Library" requires the .zip file to contain a library in the root folder. But the file downloaded from the link in my previous reply is a collection of libraries in subfolders of the .zip file, so you can't install it directly from the .zip file. But it's easy enough to install the individual libraries by doing this:


spiderman288888:
It says "font6x8AJ2.h: No such file or directory". Im guessing I need the libraries for these games?

It may be that you need libraries, but a missing library is not the cause of this error. Because most Arduino sketches only consist of a single .ino file, it's easy to assume that the .ino file is the sketch. However, sketches can consist of multiple files, even .h, .cpp, .c, and other file types. In fact, it's the folder that is the sketch, not the .ino file. The frogger game is one of these multi-file sketches. It consists of two files:

  • Frogger_Attiny_Arcade.ino
  • font6x8AJ2.h

If you download the .zip file from ATtiny85 Game code gitHub 8MHz bootloader, you'll find both those files in the Frogger_Attiny_Arcade folder. So the error you're getting indicates that you somehow moved the .ino file away from the folder that contained the font6x8AJ2.h file

Thank you pert! Well, what I did was unzipped the folder with all the games, opened up the frogger sketch, then went to **sketch>include library>add zip>looked for the folder of the game and clicked on the entire folder for that game. ** That seemed to work as when I verified, it went through ok!

I noticed that when you click on the folder of each game it will have a .h file, a schematic and the sketch. When I try to open up the .h file it asks me to choose a program to open it with and am always super confused every time I receive that message and usually just close down the file. Since it is a .h file I'm guessing it's the library for it. When I would try to look for that file when adding the zip library and I would click on the folder containing the game, the file would show up empty and would not allow to just click on the .h file. I thought it odd to select the entire folder containing the game and sketch, but when I did that it worked!

Now I need to connect everything and see if works correctly. Waiting for my OLED displays to come in.

While I wait for my 128 x 64 displays to come in I have been working on 128 x 32 displays. Is there a way to modify a .cpp file? The sketch I am using is a very simple one.

#include "TinyWireM.h"
#include "TinyOzOLED.h"
void setup() {
  OzOled.init();
//  OzOled.setInverseDisplay();  // Invert display
  OzOled.printString("Hi there!");
}
void loop() {
  // put your main code here, to run repeatedly:
}

The text is very tiny on the OLED display. I opened the TinyOzOLED cpp file using notepad and added these changes as seen in this video

This is what I added as I followed the directions on the video to make full size text.

setNormalDisplay();  //default Set Normal Display
	setPageMode();	// default addressing mode
	clearDisplay();
        sendCommand(0xA8); //ADDED THIS LINE MYSELF  Multiplexer
        sendCommand(0x1F); //ADDED THIS LINE MYSELF
        sendCommand(0xDA); //ADDED THIS LINE MYSELF  Com Pins
        sendCommand(0x02); //ADDED THIS LINE MYSELF
	setCursorXY(0,0);
	sendCommand(0x8d); //Charge Pump
        sendCommand(0x14);

Am I missing something?

That's how you modify .cpp files. Just open them in your text editor of choice, make the changes, then save.

When I modified the .cpp file to make the text bigger as seen above, nothing happens. Anyone know a good TinyOzOLED library? Or what did I do wrong?

I found this great library with examples for anyone that needs it! If you click on the folder and examples, there will be some sketches with code. Works great!

https://github.com/datacute/Tiny4kOLED

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.