Classic snake game for the STM32 board.
Go to file
divaldo 0a1dabea19 Update 'README.md' 2018-08-30 23:31:06 +02:00
README.md Update 'README.md' 2018-08-30 23:31:06 +02:00
snake.ino Initial working version 2018-08-30 23:15:51 +02:00

README.md

Classic Snake game for the STM32 board

Hardware prerequisities

  • stm32duino (should work on generic Arduino boards)
  • Philips PCD8544 (Nokia 3310) LCD

Software prerequisities

Building and flashing

Just as with normal Arduino codes, build and flash it from the Arduino Software.

  • Board: Generic STM32F103C series
  • Variant: STM32F103C8 (20K RAM. 64K Flash)
  • CPU Speed: 72MHz

Note

If using a different board, then change the configuration and modify the pins accordingly. For the STM32 board the following changes are necessary:

Adafruit_PCD8544.h:

#define PCD8544_SPI_CLOCK_DIV SPI_CLOCK_DIV4 -> #define PCD8544_SPI_CLOCK_DIV SPI_CLOCK_DIV8
#ifdef __SAM3X8E__
typedef volatile RwReg PortReg;
typedef uint8_t PortMask; -> typedef uint32_t PortMask;
#else
typedef volatile uint32_t PortReg;
typedef uint8_t PortMask; -> typedef uint32_t PortMask;
#endif