Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - gef3233

Pages: 1
1
Thank you! I actually did not know that there was a tutorial on that subject. Thank you very much!

2
I was wondering if there is any way to keep the internal RTC clock of the TinyScreen+ to keep the time and date while the TinyScreen+ is off. My TinyScreen+ has a battery on it, so ideally the battery would keep the RTC going.

3
Tiny Arcade & Pocket Arcade / Displaying the weather in the TinyArcade
« on: January 17, 2017, 10:57:00 AM »
I just wanted to share with you a project I developed over the past few days, now you can use your TinyArcade as a weather display :D


All the code and the instructions are in github: https://github.com/pjimenezmateo/tinyarcade-weather-display

4
Ok, I could finally figure it out. Apparently I had to use a serial USB. I attach the code with an example so everyone that needs it can benefit from it:

Code: [Select]
//-------------------------------------------------------------------------------
//
// This example should help new users to communicate to their tinyarcades via serial port
//
// Written by Pablo Jimenez Mateo
//-------------------------------------------------------------------------------

#include <Wire.h>
#include <TinyScreen.h>

TinyScreen display = TinyScreen(TinyScreenPlus);

void setup(void) {
  Wire.begin();//initialize I2C before we can initialize TinyScreen- not needed for TinyScreen+
  display.begin();
  display.setBrightness(10);

  //This is for serial communication
  USBDevice.init();
  USBDevice.attach();
  SerialUSB.begin(9600);
}

void loop() {
  delay(1500);
  SerialUSB.println("Hi");
 
  String cmd = "";

  //Read an entire line from serial
  while (SerialUSB.available() > 0) {
    cmd += (char)SerialUSB.read();
  }

  if (cmd.length() > 2) {
    writeText(cmd);
  } else {
    writeText("No text :(");
  }
}

void writeText(String text){

  //String to char*
  char t[text.length()+1];
  text.toCharArray(t, text.length() + 1);

  display.clearScreen();
 
  //setFont sets a font info header from font.h
  //information for generating new fonts is included in font.h
  display.setFont(thinPixel7_10ptFontInfo);
 
  int width = display.getPrintWidth(t);
 
  //setCursor(x,y);//set text cursor position to (x,y)- in this example, the example string is centered
  display.setCursor(48-(width/2),20);
 
  //fontColor(text color, background color);//sets text and background color
  display.fontColor(TS_8b_Green,TS_8b_Black);
  display.print(t);
}

5
Hello all,

I am programming the TinyArcade, using Ubuntu.

I have a basic modification of TinyScreenBasicExample.ino:

Code: [Select]
void setup(void) {
  Wire.begin();//initialize I2C before we can initialize TinyScreen- not needed for TinyScreen+
  display.begin();
  //setBrightness(brightness);//sets main current level, valid levels are 0-15
  display.setBrightness(10);
  Serial.begin(9600);
}

void loop() {
  Serial.print("hello!");
}

My problem is that after uploading the sketch, the TinyArcade disconnects from the serial port and I am unable to send/receive any data.

Also, I might be uploading the sketch incorrectly, the only way I found my code to run (still without the serial part) was uploading the code as "TinyArcade Menu", the "Binary for SD card" option does not seem to work.

Can somebody help me with those issues? How should I create the binary to upload it to the SD card like the example games are?

Thanks!

Pages: 1
SMF spam blocked by CleanTalk