Commit Graph

33 Commits

Author SHA1 Message Date
Andrew Dent 279fd9d0f4 Fix typos in a few places
Pedantic tweaks:

- Fix spellings in a few places.

- Update License copyright year.
2021-06-26 00:13:05 +01:00
Scott Allen 014e6e0a8b Add FontDemo example sketch
Shows the entire font and demonstrates the wrap and raw mode handling.
2020-09-29 09:44:40 -04:00
Scott Allen 86169a0027 Modify SetSystemEEPROM to use char size functions
The library functions to get the dimensions of text characters replace
values hard coded in the sketch.

Also changed some #define constants to constexpr variables.

The actual operation of the sketch is unchanged.
2020-09-28 21:12:31 -04:00
Scott Allen 350a6ee629 Fix a cursor position bug in BeepDemo example 2020-08-23 15:23:00 -04:00
Scott Allen 5d154f817a Make SetSystemEEPROM more C++ correct
(Compiled output is identical to previous)

- Made enumerations scoped
- Changed all type byte to uint8_t
- Changed all type boolean to bool
- Changed some type unsigned int to uint16_t
- Changed C-style casts to static_cast
2020-07-27 09:37:55 -04:00
Scott Allen 2491e639aa Fix a minor visual glitch in ArduBreakout
Submitted by @uXeBoy (Dan O'Shea).
The game screen was displayed very briefly after entering a high score,
before the title screen is displayed.
2020-07-25 18:38:05 -04:00
Scott Allen 32d23b7984 Refactor ArduBreakout sound and constants
- Use precomputed constant values directly usable by the Beep class
  for tone generation arguments.
  This reduces program size significantly.

- Use the constexpr specifier for all constants.
2020-07-25 18:38:05 -04:00
Scott Allen e0ade6ca99 Clean up ArduBreakout a bit
No actual code changes.

- Changed colors hardcoded as 0 and 1 to BLACK and WHITE.
- Added a comment describing EEPROM space used.
- Made placement of braces and else statements consistent.
- Added spaces between some function call arguments.
- Fixed some spelling mistakes in comments.
- Removed commented out diagnostic code.
- Updated "modifications" comment.
2020-07-25 18:38:05 -04:00
Scott Allen b668114475 Add Cabi and LodePNG to LICENSE.txt
Also applied the CC0 public domain dedication to the
BeepDemo and RGBled example sketches
2020-07-25 18:38:04 -04:00
Scott Allen 53096d87bf Refactor API code. Clarify and enhance user docs.
Includes some suggestions and guidance by @Pharap

API:
- Rename non-API function swap() to swapInt16()
- Make swapInt16(), drawCircleHelper(), fillCircleHelper() and
  struct BitStreamReader protected members of Arduboy2Base
- Add #define ARDUBOY_UNIT_NAME_BUFFER_SIZE for the size of a buffer
  to hold a Unit Name
- Move the position of the PROGMEM keyword for lcdBootProgram[]
  for consistency

Documentation:
- Remove absolute values referring to a Unit Name
- More details relating to the use of the Unit Name
- More details relating to the font and text functions
- Other minor documentation changes and spelling corrections
2020-07-24 17:15:13 -04:00
Scott Allen b8c1cb742a Add EEPROM flag to disable RGB LED with boot logo
Flag SYS_FLAG_SHOW_LOGO_LEDS added to EEPROM_SYS_FLAGS.
The boot logo functions check the flag and leave the RGB LED off if
the flag isn't set.

Added functions writeShowBootLogoLEDsFlag() and
readShowBootLogoLEDsFlag() for writing and reading the
SYS_FLAG_SHOW_LOGO_LEDS flag.

Example sketch SetSystemEEPROM modified to allow setting the
SYS_FLAG_SHOW_LOGO_LEDS flag.
2018-04-07 07:09:49 -04:00
Scott Allen a43e745250 Add system EEPROM flag to disable the boot logo
Flag SYS_FLAG_SHOW_LOGO added to EEPROM_SYS_FLAGS. The boot logo
functions check the flag and bypass the logo sequence if the flag
isn't set.

Added functions writeShowBootLogoFlag() and readShowBootLogoFlag()
for writing and reading the SYS_FLAG_SHOW_LOGO flag.

Renamed example sketch SetNameAndID to SetSystemEEPROM and added
the ability to set the SYS_FLAG_SHOW_LOGO flag, plus menus to reset
the system and user EEPROM areas.
2018-03-22 08:11:24 -04:00
Scott Allen fb77929126 Refactor setRGBled() and add freeRGBled()
- setRGBled() has been rewritten to directly control the hardware
  instead of using the Arduino analogWrite() function.

- Added a two parameter version of setRGBled() that sets the brightness
  of one LED without affecting the others.

- Added function freeRGBled() for freeing the PWM control of the LEDs
  so they can be used digitally.

- Added example sketch RGBled.
2018-03-11 05:40:44 -04:00
Scott Allen 53ea8188d5 Add Beep classes for playing simple tones
Also added a BeepDemo example sketch and modified the ArduBreakout
example sketch to use the BeepPin1 class instead of Arduino tone().
2018-03-11 05:40:44 -04:00
Scott Allen 3572a013e1 Make showing the unit name with the logo optional
- Added a flag in system EEPROM to indicate if the unit name
  should be displayed at the end of the boot logo sequence.
  Function bootLogoExtra() displays the unit name only if the
  flag is set.

- Added functions writeShowUnitNameFlag() and readShowUnitNameFlag()
  to write and read the "Show Unit Name" flag in EEPROM.

- Enhanced the SetNameAndID example sketch to allow setting the
  "Show Unit Name" flag in EEPROM.
2017-04-25 15:36:42 -04:00
Scott Allen b4707dc546 Fix comment in PlayTune sketch: Devkit -> DevKit 2017-02-07 09:57:32 -05:00
Scott Allen 2fede9cb86 Add read/write EEPROM unit name and ID functions
Also:
- Changes to show the unit name on the boot logo screen
- Added new example sketch SetNameAndID to allow setting the name and ID
- Updated the LICENSE.txt file and made changes to include it in the
  Doxygen generated documentation
2017-02-06 18:09:50 -05:00
Scott Allen 9d2559c248 Change PlayTune example score and frame rate 2016-10-19 21:23:18 -04:00
Scott Allen f9dc4cb0e5 Fixes and cleanups of ArduBreakout example sketch
- Changed banner name from ARAKNOID to BREAKOUT.
- Set frame rate appropriately for the corrected nextFrame() function.
- Removed dead and non-functioning code.
- Cleaned up save, load and display of high scores.
- Made pausing the game work.
- Display the achieved score on the "game over" screen.

Also: Minor refactor of function nextFrame()
2016-09-17 18:54:55 -04:00
Scott Allen 3b96b7ba24 Migrate example sketches
Renamed Tunes to PlayTune and enhanced it to better demonstrate the
ArduboyPlaytune library's capabilities.
2016-06-30 19:40:17 -04:00
Scott Allen dd6a337242 Fix bug created when AbPrinter class was added 2016-05-26 18:30:27 -04:00
Scott Allen 305423f600 Use angle brackets for including Arduboy.h 2016-05-26 18:30:27 -04:00
Scott Allen ba367bc2c6 Remove duplicate Arduboy.h include 2016-05-26 18:30:27 -04:00
Josh Goebel c5445c7b9c fix examples with now breaking API changes 2016-05-26 17:19:18 -04:00
Josh Goebel 8eb4deed69 ardubreakout should use new separate print class 2016-05-26 17:19:18 -04:00
Josh Goebel 2223f5e835 ArduBreakout should use shared libraries for music 2016-05-26 17:19:18 -04:00
Josh Goebel c22e156f60 make sure audio is on 2016-05-26 17:19:18 -04:00
Josh Goebel 81c534ee3d rip out tunes 2016-05-26 17:19:18 -04:00
Josh Goebel 390e5919dc break out printing into separate class (-2,014 bytes)
- stated savings is for any graphics only programs
  not using the printing code at all
2016-05-26 17:19:18 -04:00
Scott Allen 5042811cec Remove logo and clean up ArduBreakout
Scroll down "Arduboy" logo was removed because the library now
provides a similar logo.

setup() and loop() moved to the beginning of the code.

Minor changes and cleanup.
2016-05-26 17:19:18 -04:00
rogosher 3ef49d186f Create README.md 2016-05-26 17:19:17 -04:00
rogosher 29221099ce Delete README.md 2016-05-26 17:19:17 -04:00
Arduboy 982175ecac Squash commits up to Arduboy V1.1 release 2016-05-26 17:18:33 -04:00