소스 검색

Added Pacman demo

main
Mike S 5 년 전
부모
커밋
ef80eefc1d
15개의 변경된 파일11302개의 추가작업 그리고 0개의 파일을 삭제
  1. +56
    -0
      examples/Bluetooth/Pacman-Teensy-BT/ILI9341_due_config.h
  2. +1754
    -0
      examples/Bluetooth/Pacman-Teensy-BT/Pacman-Teensy-BT.ino
  3. +997
    -0
      examples/Bluetooth/Pacman-Teensy-BT/PacmanTiles.h
  4. +77
    -0
      examples/Bluetooth/Pacman-Teensy-BT/README.md
  5. +2933
    -0
      examples/Bluetooth/Pacman-Teensy-BT/crntsc.h
  6. +2403
    -0
      examples/Bluetooth/Pacman-Teensy-BT/crpal.h
  7. +3082
    -0
      examples/Bluetooth/Pacman-Teensy-BT/font8x8.cpp
  8. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/apple.png
  9. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/bell.png
  10. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/cherry.png
  11. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/galaxian.png
  12. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/grape.png
  13. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/key.png
  14. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/peach.png
  15. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/strawberry.png

+ 56
- 0
examples/Bluetooth/Pacman-Teensy-BT/ILI9341_due_config.h 파일 보기

@@ -0,0 +1,56 @@
/*
ILI9341_due_config.h - Arduino Due library for interfacing with ILI9341-based TFTs

Code: https://github.com/marekburiak/ILI9341_due
Documentation: http://marekburiak.github.io/ILI9341_due/

Copyright (c) 2015 Marek Buriak

*/

#ifndef _ILI9341_due_configH_
#define _ILI9341_due_configH_

// comment out the SPI mode you want to use (does not matter for AVR)
#define ILI9341_SPI_MODE_NORMAL // uses SPI library
//#define ILI9341_SPI_MODE_EXTENDED // uses Extended SPI in Due, make sure you use pin 4, 10 or 52 for CS
//#define ILI9341_SPI_MODE_DMA // uses DMA in Due

// set the clock divider
#if defined ARDUINO_SAM_DUE
#define ILI9341_SPI_CLKDIVIDER 4 // for Due
#elif defined ARDUINO_ARCH_AVR
#define ILI9341_SPI_CLKDIVIDER SPI_CLOCK_DIV2 // for Uno, Mega,...
#elif defined(TEENSYDUINO)
#define SPICLOCK 30000000
#endif



// uncomment if you want to use SPI transactions. Uncomment it if the library does not work when used with other libraries.
#define ILI_USE_SPI_TRANSACTION

// comment out if you do need to use scaled text. The text will draw then faster.
#define TEXT_SCALING_ENABLED

// default letter spacing
#define DEFAULT_LETTER_SPACING 2

// default line spacing
#define DEFAULT_LINE_SPACING 0

// sets the space between lines as part of the text
//#define LINE_SPACING_AS_PART_OF_LETTERS

// number representing the maximum angle (e.g. if 100, then if you pass in start=0 and end=50, you get a half circle)
// this can be changed with setArcParams function at runtime
#define DEFAULT_ARC_ANGLE_MAX 360

// rotational offset in degrees defining position of value 0 (-90 will put it at the top of circle)
// this can be changed with setAngleOffset function at runtime
#define DEFAULT_ANGLE_OFFSET -90




#endif

+ 1754
- 0
examples/Bluetooth/Pacman-Teensy-BT/Pacman-Teensy-BT.ino
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 997
- 0
examples/Bluetooth/Pacman-Teensy-BT/PacmanTiles.h
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 77
- 0
examples/Bluetooth/Pacman-Teensy-BT/README.md 파일 보기

@@ -0,0 +1,77 @@
# Pacman-Arduino-Due / Modified for Teensy 3.6 and T4.x
Pacman Game for Arduino Due with tft ILI9341 and VGA output support

Pacman Game on Arduino Due with ILI9341 and VGA support (available 2 outputs at the same time), playable with keypad, 5 sample levels, VGA output is 240x320, source code avaliable on Github, Licensed under MIT License.

Original Pacman sketch modified to use a Teensy 3.6/T4 with ILI9341_t3n and USBHost_t36 libraries. Intended as demo for the incorporating BT or Serial gamepads such as the PS3 and PS4 into a user application.

Originally posted on:
Arduino Forum:

http://forum.arduino.cc/index.php?topic=375394.0

Video:

https://www.youtube.com/watch?v=2Hdzr6m4QdU



<pre>
/******************************************************************************/
/* */
/* PACMAN GAME FOR TEENSY */
/* */
/******************************************************************************/
/* Copyright (c) 2014 Dr. NCX (mirracle.mxx@gmail.com) */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL */
/* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED */
/* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR */
/* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES */
/* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, */
/* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS */
/* SOFTWARE. */
/* */
/* MIT license, all text above must be included in any redistribution. */
/******************************************************************************/
/* Original Pacman sketch modified to use a Teensy 3.6/T4 with ILI9341_t3n */
/* and USBHost_t36 libraries. Intended as demo for the incorporating BT */
/* or Serial gamepads such as the PS3 and PS4 into a user application. */
/* The original version for the Arduino Due and SNES controllers can be */
/* found at */
/* https://forum.arduino.cc/index.php?topic=375394.0 */
/* and */
/* https://github.com/DrNCXCortex/Pacman-Arduino-Due */
/* */
/******************************************************************************/
/* ILI9341: */
/*----------------------------------------------------------------------------*/
/* 8 = RST */
/* 9 = D/C */
/* 10 = CS */
/* can be changed at user discretion */
/*----------------------------------------------------------------------------*/

/*----------------------------------------------------------------------------*/
/* KEYPAD: */
/*----------------------------------------------------------------------------*/
/* PS3: button START/Pause */
/* button SELECT */
/* button A/Diamond */
/* button B /Circle */
/* button UP */
/* button DOWN */
/* button LEFT */
/* button RIGHT */
/* */
/* PS4: button START/Pause = Share on PS4 */
/* button SELECT = Options on PS4 */
/* button A/Square */
/* button B /Circle */
/* button UP */
/* button DOWN */
/* button LEFT */
/* button RIGHT */
/* *//******************************************************************************/
</pre>

+ 2933
- 0
examples/Bluetooth/Pacman-Teensy-BT/crntsc.h
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 2403
- 0
examples/Bluetooth/Pacman-Teensy-BT/crpal.h
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 3082
- 0
examples/Bluetooth/Pacman-Teensy-BT/font8x8.cpp
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/apple.png 파일 보기

Before After
Width: 16  |  Height: 16  |  Size: 14KB

BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/bell.png 파일 보기

Before After
Width: 16  |  Height: 16  |  Size: 337B

BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/cherry.png 파일 보기

Before After
Width: 16  |  Height: 16  |  Size: 939B

BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/galaxian.png 파일 보기

Before After
Width: 16  |  Height: 16  |  Size: 947B

BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/grape.png 파일 보기

Before After
Width: 16  |  Height: 16  |  Size: 619B

BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/key.png 파일 보기

Before After
Width: 16  |  Height: 16  |  Size: 913B

BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/peach.png 파일 보기

Before After
Width: 16  |  Height: 16  |  Size: 923B

BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/strawberry.png 파일 보기

Before After
Width: 16  |  Height: 16  |  Size: 942B

Loading…
취소
저장