Arduboy Sculpture [RIP]

Use a smaller battery? It doesnt need to run as long so who cares if the battery life is reduced. Unless you want this to be an everyday usable thing.

I’m going to be using a LIR2016 which has about 10 mAh which lets it run for about 30-45 minutes.

1 Like

Will that battery be powerful enough for games with a lot of lit pixels (like Arduventure) ? I’ve read that it’s common for batteries max current to be limited to twice the batteries capacity.

Sticking a battery under the display is a good idea.

Should do just fine, I tested these with the original prototype. These coin cell packages have decent current carrying capacity.

All white game probably last about 15 minutes lol.

1 Like

You could always slow things down a little to extend battery and cut out a few components. My latest Arduboy distraction is using a low power Pro Mini clone 3.3v 8mhz ATmega328P and internal oscillator.

Yah but I don’t really feel like refactoring the code. The original was also a 328p which is also nice because the package is smaller too.

Ok so obviously this isn’t immediately compatible with the capacitive touch library:

So I guess the next step is to take this and instead of it waking on interrupt, it needs to wake up after a certain delay and test the capacitive buttons, then go back to sleep?

What’s the smallest peltier they do you might be able to generate enough by rubbing or touching it to trigger an interrupt.

Or if you had a case you could use solar like an old school calculator you could pull the panel out of one of those cheap little waving cat/ dancing flower things.

it will be fine on its rechargeable coin cell. Just need it to sleep when im not using it.

You can use the watchdog timer to wake up from power down every 0.5 seconds and read your capacitive buttons.

Yep just need to remember how to use the watchdog timer!

I got the watchdog timer to wake the Arduboy, but it always resets it, I can’t seem to get the timer to just simply wake the device, it always resets.

void autoPowerDown(uint8_t timeout)
  uint16_t time;
  asm volatile(
    "    in    __tmp_reg__, __SREG__    \n\t" //uint8_t oldSREG = SREG;
    "    cli                            \n\t" //cli()
    "    lds   %A[time], %[millis1]     \n\t" //time = (uint16_t)(millis >>8)
    "    lds   %B[time], %[millis2]     \n\t" 
    "    out   __SREG__, __tmp_reg__    \n\t" //SREG = oldSREG
    "    sub   %A[time], %A[APD_time]   \n\t" //time -= APD_time
    "    sbc   %B[time], %B[APD_time]   \n\t" 
    "1:                                 \n\t" 
    : [time]     "=&r" (time)
    : [millis1]  ""    ((uint8_t*)(&timer0_millis)+1),
      [millis2]  ""    ((uint8_t*)(&timer0_millis)+2),
      [APD_time] "r"   (APD_time)
  if (time >= timeout * 16)
 if (buttonsIdleTime() >= timeout)
  #ifndef ARDUBOY_NO_USB
    UDIEN = 0;            //disable USB interrupts left enabled after upload
    USBCON = _BV(FRZCLK); //disable VBUS transition interrupt, freeze USB clock for power savings
    UDCON  = 1 << DETACH; //disconnect from USB bus
    /* Clear the reset flag. */
  MCUSR &= ~(1<<WDRF);
  /* In order to change WDE or the prescaler, we need to
   * set WDCE (This will allow updates for 4 clock cycles).
  WDTCSR |= (1<<WDCE) | (1<<WDE);

  /* set new watchdog timeout prescaler value */
  WDTCSR = 1<<WDP0 | 1<<WDP3; /* 8.0 seconds */
  /* Enable the WD interrupt (note no reset). */
    //INT6_enable();               //enable A button interrupt

  #ifndef ARDUBOY_NO_USB
    init();                      //restore USB support
#ifndef ARDUBOY_CORE    
#ifndef ARDUBOY_CORE    
  if (Arduboy2Core::buttonsState()) autoPowerDownReset(); //reset power down time on any button press

Any ideas?

Not really sure why but this ended up working:

  MCUSR = 0;                          // reset various flags
  WDTCSR |= 0b00011000;               // see docs, set WDCE, WDE
  WDTCSR =  0b01000000 | 0b100000;    // set WDIE, and appropriate delay

So now all I gotta do is check the buttons and put it back to sleep if nothing pressed :smiley:

1 Like

Sometimes I get stuck on the most simple things, how do I call an arduboy function from within another library?

		// button pressed so go back to the game
		// nothing pressed go back to sleep for 8 more seconds
	MCUSR = 0;                          // reset various flags
	WDTCSR |= 0b00011000;               // see docs, set WDCE, WDE
	WDTCSR =  0b01000000 | 0b100001;    // set WDIE, and appropriate delay

Which throws this error:

sketch\src\autopowerdown.cpp:89:102: error: cannot call member function ‘bool Arduboy2Base::pressed(uint8_t)’ without object

Im a newb but dont you have to call an object of that class first so like
Arduboy2 arduboy;

then change the first bit to



That’s how you would initialize it within the sketch, but it is outside of the scope of the library.

FIXED, buttonsState() works for me, and it’s exposed.


	MCUSR = 0;                          // reset various flags
	WDTCSR |= 0b00011000;               // see docs, set WDCE, WDE
	WDTCSR =  0b01000000 | 0b100001;    // set WDIE, and appropriate delay

Alright, software is done, now it’s time to solder up some magnet wire! The challenge will be soldering the second connection without the heat conducting through to the other side. You can only quickly tap the soldering iron to it.

This is the plan (not to scale)

1 Like

Have you tried wire glue?

I have some conductive carbon ink but no glue, I don’t suspect it would work at all at this fine pitch as I’m heavily relying on the surface tension (or whatever the property is) of the solder sucking the wire or component to the pad.

I’m going to use the conductive ink to make the battery connection.

Use the smallest tip you have and some flux, flux it, add a little solder to the tip and press. You should be able to solder fine with just a teeny tap of the iron.

As I feared using too short of a wire is a problem, the other side comes unsoldered and then sticks to the soldering iron and I can’t get it off then I use bad language and curse my creator. I’m going to have to make sure the wire is at least about a centimeter or two in length, and they should all be single runs, trying to tap into a line is even worse because it bisects the thermal transfer (burning a candle from the middle).

It’s also going to be a tremendous help to have the wires pre cut and formed with ends already tinned, so in true form to copy mohits design, he uses a template to bend the wires before constructing them, and it looks like I’ll have to do the same.

They say it isn’t art unless you suffer, I’m not so sure about this deadline though.