Skip to content

Instantly share code, notes, and snippets.

@Pharap
Created March 27, 2018 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pharap/5ae1104c6ab93d3198574449ee8831be to your computer and use it in GitHub Desktop.
Save Pharap/5ae1104c6ab93d3198574449ee8831be to your computer and use it in GitHub Desktop.

The Premise

Sparked by some discussion over here, it's time to discuss the arduboy.boot() vs arduboy.begin() conundrum.

These days it seems many people choose to use boot over begin, so this thread is here to find out what people prefer and why they prefer it.


The Situation

For those who aren't aware of the details, begin is defined as thus:

void Arduboy2Base::begin()
{
  boot(); // raw hardware

  display(); // blank the display (sBuffer is global, so cleared automatically)

  flashlight(); // light the RGB LED and screen if UP button is being held.

  // check for and handle buttons held during start up for system control
  systemButtons();

  audio.begin();

  bootLogo();
  // alternative logo functions. Work the same as bootLogo() but may reduce
  // memory size if the sketch uses the same bitmap drawing function
//  bootLogoCompressed();
//  bootLogoSpritesSelfMasked();
//  bootLogoSpritesOverwrite();
//  bootLogoSpritesBSelfMasked();
//  bootLogoSpritesBOverwrite();

  waitNoButtons(); // wait for all buttons to be released
}

Often people want to remove the logo for various reasons, so they end up putting something like this in their setup code:

arduboy.boot();
arduboy.display();
arduboy.flashlight();
arduboy.systemButtons();
arduboy.audio.begin();
// no call to bootLogo
arduboy.waitNoButtons();

Some people forget to include some of the other functions or chose not to include the other functions either because they don't understand their purpose or feel that they don't add much. Typically the ones missed out will be display and waitNoButtons. So sometimes it will look more like:

arduboy.boot();
// don't bother displaying the screen yet
arduboy.flashlight();
arduboy.systemButtons();
arduboy.audio.begin();
// no call to bootLogo
// no waiting for buttons to be released

As of Arduboy2 v5.0.0, released on the 22nd of March 2018, the logo can be disabled per Arduboy ysing an EEPROM flag, much in the same way sound can. This retains the Arduboy logo in progmem but does not display it when the flag is set. Please bear this in mind when voting.


The Survey

(All polls are anonymous so people can contribute their opinions without having to get too involved in the discussion if they don't want to be.)

There are 8 questions.

Should people be reminded to use begin if they are using boot or vice versa?

[poll type=regular]

  • Just let people use what they want
  • Continue to remind people of the other options
  • Ask them if they've considered the other options but accept it if they say don't want to change, whatever the reason for it is
  • Ask them if it looks like they're a beginner or it's their first program in case they don't know [/poll]

Which do you prefer?

[poll name=bootOrBegin type=regular]

  • I prefer boot
  • I prefer begin
  • I like both equally
  • I prefer boot if I need the program space, but usually prefer begin [/poll]

Do you like having the Arduboy logo at the start?

[poll name=logoOpinion type=regular]

  • I like the Arduboy logo at the start
  • I don't like the Arduboy logo at the start
  • I like the Arduboy logo at the start, but don't like the flashing LED
  • I like the Arduboy logo at the start, but don't mind people using custom logos instead
  • I prefer it when people use custom logos
  • I like the Arduboy logo at the start, as well as an additional custom logo/splash screen [/poll]

When writing games/programs, do you use boot more than begin?

[poll name=bootUsage type=regular]

  • Yes, I use boot more
  • No, I use begin more
  • I use one of the other boot functions (e.g. bootLogoShell) [/poll]

Why do you use boot instead of begin?

(Please only vote on this if you selected "Yes, I use boot more".)

[poll name=whyBoot type=regular]

  • I don't like the Arduboy logo
  • I don't like the flashing LEDs
  • It helps me develop/test quicker
  • I prefer having my own logo instead, and don't know about bootLogoShell
  • I prefer having my own logo instead, and don't like bootLogoShell [/poll]

Why do you use begin instead of boot?

(Please only vote on this if you selected "No, I use begin more".)

[poll name=whyBegin type=regular]

  • I like having the Arduboy logo
  • I like having the flashing LEDs
  • It's the proper way to do things
  • I don't know how to use boot [/poll]

Do we need a beginNoLogo function, that behaves the same as begin but without drawing the logo?

[poll name=beginNoLogo type=regular]

  • Yes, we need a beginNoLogo, it's a common case that deserves special attention
  • No, we don't need a beginNoLogo, manually selecting the parts of begin is fine
  • No, because then we'd have to have bootNoFlashlight, bootNoSystemButtons etc. [/poll]

Is the EEPROM flag in v5.0.0 an acceptable compromise?

[poll name=eepromFlag type=regular]

  • Yes, let the individual choose
  • No, I'd rather have the progmem
  • No, I'd rather have only my logo/remove the Arduboy logo for aesthetic reasons
  • No, because it still has the LEDs flashing
  • Don't care either way
  • Uncertain [/poll]

Please feel free to discuss your choices if you wish to explain your stance or if you feel the polls do not adequately express you opinion.

(I don't need to say this but I'll say it anyway, stay civil - discuss the ideas and reasons, not the people expressing them.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment