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 - thesko

Pages: 1 2
Hey Ben!

Glad to get an answer :)
So to make sure I got it right:
Code: [Select]
[1M ohm]
 |--> Analog A4
[1M ohm]

If that is the case I could hack it into the board I have here and use the example from here to read it:

About the bootloader:
I have a CP2102 USB to TTL converter, but in any case, since the TinyScreen+ does not have any visible headers for a programmer I fear this will be too risky just for getting a bootloader screen :P
Getting the battery readout is all I really needed compared to the previous version.

So if you can verify my ASCII diagram above I'm good :)

EDIT: I just realized that the schematics were attached to this post:

Cheers and thanks!

New Product Ideas / Tiniest possible arduino
« on: July 12, 2018, 10:31:07 AM »
Recently I've discovered this design for a 0.4" x 0.4" arduino compatible board:

My proposal:
  • a similarily sized Tinyduino, possibly powered by a small battery cell
  • a neopixel addon board which can be soldered to the bottom side of the board (using spacers)

still no answer...  :( I guess there is no way to do this?

Tiny Arcade & Pocket Arcade / Re: Truly Random Numbers
« on: July 10, 2018, 05:34:00 AM »
I haven't deeply looked into it yet but will need that too...
My current approach is to use analogRead(0)+analogRead(1)+millis().

My only idea for now was to change millis() for micros(), but in my case I set the seed in setup().
And since it should take exactly the same amount of cycles each time I fear my random will not be very random :/


Also those standard beginner tutorials should mention the bootloader key-combo for the specific device.
I had quite a lot of trouble uploading my first sketch to the TinyScreen+ until I found the note on the product page for the reset.

Hi John,

I'm myself pretty new to the TinyCircuits hardware, but knowing from my TinyScreen+, these devices have a bootloader mode that you can reach to upload sketches regardless of what is uploaded right now.

For your case with TinyArcade I've found the following post by Ben that might be helpful for you and your son:

 - Set your Arduino IDE to "Internal 32KHz Oscillator" (should be in the build menu)
 - switch the Arcade off, then while pressing both buttons, switch it back on

Usually this should show up a black screen with a white text saying someting about "Bootloader Mode"

Note: Even if the screen is still black at that stage, try uploading anyway.
One of four TinyScreen+ I own have a different bootloader and do not show that text screen, while still being in the bootloader mode.


I have the exact same problem! Nothing happens beyond rf22.init();

I have also tried the code from the football example:

But here the lockup also happens on manager.init()

This also happens with all TinyScreen code removed (even the include), so I assume a hardware/pin issue?

@Ben: Any idea what is going on? Is the LORA board incompatible with the TinyScreen+?
If so, I have wasted money on those chips that instead I could have put into alternatives :(((

Ok I have no clue what changed over night, but today the same code just works....  :o
Here is the Example I'm using for the TinyScreen+

Important: I'm using the latest version of RadioHead available on their site!

Code: [Select]
#include <Wire.h>
#include <SPI.h>
#include <RHReliableDatagram.h>
#include <RH_RF22.h>

//#define NOSCREEN

#ifndef NOSCREEN
#include <TinyScreen.h>
TinyScreen display = TinyScreen(TinyScreenPlus);

//define the address

bool started = false;

RH_RF22 driver(7,3);
// Class to manage message delivery and receipt, using the driver declared above
RHReliableDatagram manager(driver, CLIENT_ADDRESS);

// This function gets the battery VCC internally, you can checkout this link
// if you want to know more about how:
float getVCC() {
  while (ADC->STATUS.bit.SYNCBUSY == 1);
  while (ADC->STATUS.bit.SYNCBUSY == 1);
  ADC->INPUTCTRL.bit.MUXPOS = 0x19;         // Internal bandgap input
  while (ADC->STATUS.bit.SYNCBUSY == 1);
  ADC->CTRLA.bit.ENABLE = 0x01;             // Enable ADC
  while (ADC->STATUS.bit.SYNCBUSY == 1);
  ADC->SWTRIG.bit.START = 1;  // Start conversion
  ADC->INTFLAG.bit.RESRDY = 1;  // Clear the Data Ready flag
  while (ADC->STATUS.bit.SYNCBUSY == 1);
  ADC->SWTRIG.bit.START = 1;  // Start the conversion again to throw out first value
  while ( ADC->INTFLAG.bit.RESRDY == 0 );   // Waiting for conversion to complete
  uint32_t valueRead = ADC->RESULT.reg;
  while (ADC->STATUS.bit.SYNCBUSY == 1);
  ADC->CTRLA.bit.ENABLE = 0x00;             // Disable ADC
  while (ADC->STATUS.bit.SYNCBUSY == 1);
  float vcc = (1.1 * 1023.0) / valueRead;
  return vcc;

// Calculate the battery voltage
float getBattVoltage(void) {
  const int VBATTpin = A4;
  float VCC = getVCC();

  // Use resistor division and math to get the voltage
  float resistorDiv = 0.5;
  float ADCres = 1023.0;
  float battVoltageReading = analogRead(VBATTpin);
  battVoltageReading = analogRead(VBATTpin); // Throw out first value
  float battVoltage = VCC * battVoltageReading / ADCres / resistorDiv;

  return battVoltage;

void setup()
  // give 5 sec to connect the serial monitor
#ifndef NOSCREEN
  display.fontColor(TS_8b_White, TS_16b_Black);
  display.setCursor(0, 0);
  display.print("TinyLORA starting..");
  SerialUSB.println("starting rf22..");
  started = manager.init();
  if (started)
#ifndef NOSCREEN
    display.setCursor(0, 10);
    display.print("TinyLORA started.");
#ifndef NOSCREEN
    display.setCursor(0, 10);
    display.print("init() failed!");
    SerialUSB.println("init() failed!");

void loop()
  if (!started) return;
  uint8_t buf[RH_RF22_MAX_MESSAGE_LEN];
  // Send a message to manager_server2
  #define SERVER_ADDRESS 2
  uint8_t len = sizeof(buf);

#ifndef NOSCREEN
  display.fontColor(TS_8b_White, TS_16b_Black);
  display.setCursor(0, 0);
  display.setCursor(0, 10);
  uint8_t data[2];
  int voltage = getBattVoltage() * 100;
#ifndef NOSCREEN
  if (manager.sendtoWait(data, sizeof(data), SERVER_ADDRESS))
    uint8_t from;
    //check if we received a reply
    if (manager.recvfromAckTimeout(buf, &len, 2000, &from))
      SerialUSB.print("got reply from : 0x");
      SerialUSB.print(from, HEX);
      SerialUSB.print(": ");
#ifndef NOSCREEN
      display.setCursor(0, 20);
      display.setCursor(0, 30);

Hey Ben, thanks for the reply!

Since I was unable to order your batteries to Germany I will have to check if the once am using right now also have such a protection, but I fear not.

In that regard, I suppose there is no way to trigger a shutdown via code of the whole device, is there?
If not, my approach would be this:
< 3.5V = Disable all logic and render a "final" (low battery) image to the tiny screen
< 3.3V = call

Are there any other steps I should consider for reducing total power usage to a minimum? Are there any sleep states available for the chip that are compatible with the Tinyduino system?

Cheers and kind regards

Any infos on this @TinyCurcuits team?

I also realized that my second TinyScreen is unable to read the battery state using the new tutorial.
Is it possible that I have two different hardware revisions?
And if so, is it possible to update also the hardware somehow for the voltage reading?

Please help!
- the sko


After implementing the battery voltage read-out from
I noticed that the TinyScreen keeps running even on a very low battery level (below 3.5V).

Is there a threshold built into the board that shuts it off after reaching a critical voltage, or does it run until it falls below 3.3V due to being out of power?
Is that ok for the battery life or should we implement some kind of shutdown on a different voltage level?


TinyDuino Processors & TinyShields / Re: Tinyscreen+ Vbat reading
« on: June 19, 2018, 04:22:32 AM »
Works like a charm!! Now I just have to find the fitting values for a battery display with my configuration/power consumption :)

Thanks a lot!

TinyDuino Processors & TinyShields / Re: Tinyscreen+ Vbat reading
« on: June 15, 2018, 07:19:41 AM »
That is awesome news! I can really make use of this for my current project! Thanks for the update  :)

New Product Ideas / TinyScreen++
« on: June 08, 2018, 05:56:28 AM »
Hey folks,

first of all, thanks for these great products :)
So my suggestion would bascially be this:
  • TinyScreen+ with the upcoming mini connector
  • onboard eeprom (as an option maybe?)
  • Sharp Color ePaper (like in Pebble Time)

The important part here is the sharp color display.
The ePaper display is not the same as an eInk display. It features a normal refresh rate like LCDs but still comes with a very low power consumption on static images and good daylight visibility. Because of that it requires backlight for visibility in darkness.

It was used on the pebble time and any product after that, featuring good refresh rates, low power usage, and I think also 16 bit colors.

I could not find it on the sharp website, but might be worth a call or mail to ask for pricing and possibilities. The display itself should not be bigger than the wifi Tinyduino board.

Hm sounds like the TinyScreen board. Did you try the bootloader mode?
If you were able to upload a sketch to the TinyScreen+ and now it does not respond, you may need to force this into bootloader mode. To do this, power off the TinyScreen+ using the slide switch. Plug the USB cable into the TinyScreen+ and your computer. Then press and hold the button closest to the USB connector while sliding the switch to the ON position. Then try uploading your program to the TinyScreen+ and it should work. You may need to try this several times if it does not work the first time.


I have two TinyScreen+ for my project, but it looks like both are running a different version of the bootloader.
When I go into the bootloader mode on both, one of them shows a black screen, while the other prints a text like "Bootloader Mode".

Is there an easy way of getting access to the latest bootloader and updating the tinyscreen with it?
It's just difficult to make out if the Tinyscreen is running in Bootloader mode of being turned off when there is nothing on the screen.


Pages: 1 2
SMF spam blocked by CleanTalk