瀏覽代碼

Merge pull request #9 from mjs513/WIP2-Bluetooth

Wip2 bluetooth
main
KurtE 5 年之前
父節點
當前提交
7d930955c2
沒有連結到貢獻者的電子郵件帳戶。
共有 32 個檔案被更改,包括 11302 行新增0 行删除
  1. +0
    -0
      examples/Bluetooth/JoystickBT/JoystickBT.ino
  2. +0
    -0
      examples/Bluetooth/JoystickBT/defs.h
  3. +0
    -0
      examples/Bluetooth/JoystickBT/helperPS.ino
  4. +0
    -0
      examples/Bluetooth/KeyboardBT/KeyboardBT.ino
  5. +0
    -0
      examples/Bluetooth/KeyboardBT/defs.h
  6. +0
    -0
      examples/Bluetooth/MouseBT/MouseBT.ino
  7. +0
    -0
      examples/Bluetooth/MouseBT/defs.h
  8. +56
    -0
      examples/Bluetooth/Pacman-Teensy-BT/ILI9341_due_config.h
  9. +1754
    -0
      examples/Bluetooth/Pacman-Teensy-BT/Pacman-Teensy-BT.ino
  10. +997
    -0
      examples/Bluetooth/Pacman-Teensy-BT/PacmanTiles.h
  11. +77
    -0
      examples/Bluetooth/Pacman-Teensy-BT/README.md
  12. +2933
    -0
      examples/Bluetooth/Pacman-Teensy-BT/crntsc.h
  13. +2403
    -0
      examples/Bluetooth/Pacman-Teensy-BT/crpal.h
  14. +3082
    -0
      examples/Bluetooth/Pacman-Teensy-BT/font8x8.cpp
  15. 二進制
      examples/Bluetooth/Pacman-Teensy-BT/icons/apple.png
  16. 二進制
      examples/Bluetooth/Pacman-Teensy-BT/icons/bell.png
  17. 二進制
      examples/Bluetooth/Pacman-Teensy-BT/icons/cherry.png
  18. 二進制
      examples/Bluetooth/Pacman-Teensy-BT/icons/galaxian.png
  19. 二進制
      examples/Bluetooth/Pacman-Teensy-BT/icons/grape.png
  20. 二進制
      examples/Bluetooth/Pacman-Teensy-BT/icons/key.png
  21. 二進制
      examples/Bluetooth/Pacman-Teensy-BT/icons/peach.png
  22. 二進制
      examples/Bluetooth/Pacman-Teensy-BT/icons/strawberry.png
  23. +0
    -0
      examples/Serial/Joystick/Joystick.ino
  24. +0
    -0
      examples/Serial/Joystick/Joystick/Joystick.ino
  25. +0
    -0
      examples/Serial/Joystick/Joystick/ps4Helpers.ino
  26. +0
    -0
      examples/Serial/MIDI/InputFunctions/InputFunctions.ino
  27. +0
    -0
      examples/Serial/MIDI/Interface_16x16/Interface_16x16.ino
  28. +0
    -0
      examples/Serial/Mouse/Mouse.ino
  29. +0
    -0
      examples/Serial/Mouse/defs.h
  30. +0
    -0
      examples/Test/SerialTest/SerialTest.ino
  31. +0
    -0
      examples/Test/SerialTest/defs.h
  32. +0
    -0
      examples/Test/Test/Test.ino

examples/JoystickBT/JoystickBT.ino → examples/Bluetooth/JoystickBT/JoystickBT.ino 查看文件


examples/JoystickBT/defs.h → examples/Bluetooth/JoystickBT/defs.h 查看文件


examples/JoystickBT/helperPS.ino → examples/Bluetooth/JoystickBT/helperPS.ino 查看文件


examples/KeyboardBT/KeyboardBT.ino → examples/Bluetooth/KeyboardBT/KeyboardBT.ino 查看文件


examples/KeyboardBT/defs.h → examples/Bluetooth/KeyboardBT/defs.h 查看文件


examples/MouseBT/MouseBT.ino → examples/Bluetooth/MouseBT/MouseBT.ino 查看文件


examples/MouseBT/defs.h → examples/Bluetooth/MouseBT/defs.h 查看文件


+ 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
文件差異過大導致無法顯示
查看文件


二進制
examples/Bluetooth/Pacman-Teensy-BT/icons/apple.png 查看文件

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

二進制
examples/Bluetooth/Pacman-Teensy-BT/icons/bell.png 查看文件

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

二進制
examples/Bluetooth/Pacman-Teensy-BT/icons/cherry.png 查看文件

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

二進制
examples/Bluetooth/Pacman-Teensy-BT/icons/galaxian.png 查看文件

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

二進制
examples/Bluetooth/Pacman-Teensy-BT/icons/grape.png 查看文件

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

二進制
examples/Bluetooth/Pacman-Teensy-BT/icons/key.png 查看文件

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

二進制
examples/Bluetooth/Pacman-Teensy-BT/icons/peach.png 查看文件

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

二進制
examples/Bluetooth/Pacman-Teensy-BT/icons/strawberry.png 查看文件

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

examples/Joystick/Joystick.ino → examples/Serial/Joystick/Joystick.ino 查看文件


examples/Joystick/Joystick/Joystick.ino → examples/Serial/Joystick/Joystick/Joystick.ino 查看文件


examples/Joystick/Joystick/ps4Helpers.ino → examples/Serial/Joystick/Joystick/ps4Helpers.ino 查看文件


examples/MIDI/InputFunctions/InputFunctions.ino → examples/Serial/MIDI/InputFunctions/InputFunctions.ino 查看文件


examples/MIDI/Interface_16x16/Interface_16x16.ino → examples/Serial/MIDI/Interface_16x16/Interface_16x16.ino 查看文件


examples/Mouse/Mouse.ino → examples/Serial/Mouse/Mouse.ino 查看文件


examples/Mouse/defs.h → examples/Serial/Mouse/defs.h 查看文件


examples/SerialTest/SerialTest.ino → examples/Test/SerialTest/SerialTest.ino 查看文件


examples/SerialTest/defs.h → examples/Test/SerialTest/defs.h 查看文件


examples/Test/Test.ino → examples/Test/Test/Test.ino 查看文件


Loading…
取消
儲存