Discussion And Survey - Boot Vs Begin


(Pharap) #1

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 6 questions.

Which do you prefer?

  • I prefer boot
  • I prefer begin
  • I like both equally

0 voters

Do you like having the Arduboy logo at the start?

  • 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

0 voters

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

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

0 voters

Why do you use boot instead of begin?

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

  • 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

0 voters

Why do you use begin instead of boot?

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

  • 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

0 voters

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

  • 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.

0 voters


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.)


Noughts n' Crosses - A simple tic-tac-toe game [1.1]
Guinea Pigs Wanted!
MallARD Hunt (an homage)
(Scott) #2

@Pharap, I think you really need to point out near the start of the original post that, as of Arduboy2 version 5, everyone has the option of setting a flag in EEPROM that will suppress the display of the boot logo for all* sketches, just as if it were left out of the code by using boot(). I think this will have a bearing on the poll results. Maybe you need to add this to another poll or within the existing polls.

* All, of course, means sketches compiled with Arduboy2 v5 or higher. We can’t do anything about existing .hex files.

With the ability to suppress the logo on a per unit basis, the consideration as to whether a sketch should include the logo or not should come down to whether the additional program memory that can be gained is required by the particular sketch.

The whole idea behind offering boot() plus pick and choose functions was to gain program space for very large sketches. It was intended for advanced developers that knew what they were doing and why.

I’ve sped up the logo and allowed it to be completely suppressed to address complaints as best as I can think of. The only issue I can see now is that the flashing of the RGB LED is an annoyance to some, as one of the polls addresses. I can add an additional flag to EEPROM that would cause the logo to be displayed without flashing the LEDs. However, this would add a bit more code to all sketches using the logo, since it would be a dynamic test. Quickly adding this ability increased a basic sketch by 22 bytes. Since totally eliminating the logo is something that sketches needing more memory would do, IMHO adding 22 bytes to sketches that don’t need the space, and retain the logo, isn’t a problem.

Just note that I’m not the one who added the boot logo. It’s a feature carried over from the original Arduboy library and has been there, in one form or another, since almost day 1. I believe it’s something @bateske and/or the other original developers wanted to have.


(Pharap) #3

I can’t add another poll to the post after the first 5 minutes, so I’ll add it here:

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

  • 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

0 voters

I’ve added the EEPROM information to the main post though.


MallARD Hunt (an homage)
(Scott) #4

For the first poll, Which do you prefer?, there should be another option:
I use boot() if I need the program space, otherwise begin()

For the second poll, Do you like having the Arduboy logo at the start?, there should be another option:
I like the Arduboy logo at the start plus an additional custom logo/splash screen

For the fourth poll, Why do you use boot instead of begin?, the response It helps me develop/test quicker is no longer relevant. Anyone can set the “no logo” flag in EEPROM (using the SetSystemEEPROM example sketch) during development or permanently.

For fifth poll, Why do you use begin instead of boot?, for the response It’s the proper way to do things, I’d like to point out, as the library documentation states, either way is “proper”. It’s simply a case of:
If you don’t need the program space, use begin().
If you start running low on space, switch to boot() and start selectively removing features as necessary.


(Scott) #5

For the responses in the new proposed poll, Is the EEPROM flag in v5.0.0 an acceptable compromise?, you need to take into account that, as I stated above, I can add an EEPROM flag to suppress the LEDs, and if the extra 22 byte of memory it takes becomes an issue, the developer can use boot() and leave out the logo altogether. Keep in mind that about 150 bytes has been freed up for the average sketch just by using V5 instead of V4.


(Pharap) #6

5 minutes has passed, I can do a thing about any issues in the polls because I’m not a moderator.

If I could, the “why” questions would let people pick up to 3 options.

I’d gladly add:

  • “Which do you prefer?” -> “I use boot() if I need the program space, but otherwise begin()”
  • “Do you like having the Arduboy logo at the start?” -> “I like the Arduboy logo at the start as well as an additional custom logo/splash screen”

As for the “It helps me develop/test quicker” and “It’s the proper way to do things”, I added those because I was trying to predict what people would say and those are arguments I’ve heard before.
Humans aren’t always logcial, those options might have their flaws, but if people pick one of those because it accurately expresses their sentiment then I’m not going to be the one to deny them that expression.


And in fact, while I’m thinking of it, one last poll I’d like to add:

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

  • 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

0 voters


MallARD Hunt (an homage)
(Scott) #7

It’s early on. Maybe this topic should be closed and a new one created with the changes.


(Thomas) #8

There are different spices in the world programs are like meals not one programmer is the same and will choose to use different spices depending on their preferences or taste. I honestly dont know why there needs to be a discussion over something as trivial as this but Im just one voice in a crowd of many


(Scott) #9

For the new poll, Should people be reminded to use begin if they are using boot or vice versa?, there should be a response:
It depends on whether they did it deliberately or just started with another sketch as a base, without knowing why the original sketch did it


(Scott) #10

The topic of this discussion should be something like Including the boot logo, rather than Boot vs Begin. I don’t think anyone is taking issue with any of the other features that using boot() allows you to remove. (Although some might be upset when they discover that “flashlight” is missing from the currently loaded sketch, while trying to find their keys in the dark :wink:)


(Pharap) #11

Here’s the draft:

I’ll be away for an hour or two.
If there are any changes that you think of, make your own gist.
Until then unlist this or something or you’ll just get more answers.

Though to be honest I think no matter how it’s worded, people will give the same answers because most people have already made up their mind.


(Scott) #12

Another thing that hasn’t been mentioned, and that many people aren’t aware of, and which should be considered when answering the polls:
The logo can be bypassed or aborted by holding the RIGHT button while booting the unit then releasing it, or by pressing it while the logo is scrolling down.


(Thomas) #13

Why abort it when you can remove it and not have to deal with it in the first place?


(Scott) #14

The RIGHT button method was there before I added the EEPROM flag. I didn’t want to remove it, for backwards compatibility. Plus, some people may wish to have the logo when showing off the Arduboy to a friend but still be able to abort to get to the game quickly otherwise. Or, maybe two people share the unit and one likes the logo but the other doesn’t.


(Scott) #15

But the EEPROM flag is so new that if the reason for removing the logo is “to develop quicker” rather than “to gain program memory”, some people may change their mind once they are aware of this.

Also, adding the option to not use the LEDs may influence people who find them annoying but otherwise like or don’t mind the logo.


(Pharap) #16

Then like I said, take a copy of the gist, edit it to include the relevant information and then upload it as another gist.


(Alex) #17

How do I use the eeprom flag to get rid of the logo?


(Scott) #18

As stated in a previous post in this topic (and in the Arduboy2 library documentation):


(Scott) #19

I won’t have time during the next 5 hours or so, or maybe quite a bit longer.


(Pharap) #20

Then perhaps you should either unlist the thread to stop more votes rolling in or just forget it and let it be.
One of the polls already has 10 votes.