Ver código fonte

Merge pull request #9 from mjs513/WIP2-Bluetooth

Wip2 bluetooth
main
KurtE 5 anos atrás
pai
commit
7d930955c2
Nenhuma conta vinculada ao e-mail do autor do commit
32 arquivos alterados com 11302 adições e 0 exclusões
  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. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/apple.png
  16. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/bell.png
  17. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/cherry.png
  18. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/galaxian.png
  19. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/grape.png
  20. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/key.png
  21. BIN
      examples/Bluetooth/Pacman-Teensy-BT/icons/peach.png
  22. BIN
      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 Ver arquivo


examples/JoystickBT/defs.h → examples/Bluetooth/JoystickBT/defs.h Ver arquivo


examples/JoystickBT/helperPS.ino → examples/Bluetooth/JoystickBT/helperPS.ino Ver arquivo


examples/KeyboardBT/KeyboardBT.ino → examples/Bluetooth/KeyboardBT/KeyboardBT.ino Ver arquivo


examples/KeyboardBT/defs.h → examples/Bluetooth/KeyboardBT/defs.h Ver arquivo


examples/MouseBT/MouseBT.ino → examples/Bluetooth/MouseBT/MouseBT.ino Ver arquivo


examples/MouseBT/defs.h → examples/Bluetooth/MouseBT/defs.h Ver arquivo


+ 56
- 0
examples/Bluetooth/Pacman-Teensy-BT/ILI9341_due_config.h Ver arquivo

@@ -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
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 997
- 0
examples/Bluetooth/Pacman-Teensy-BT/PacmanTiles.h
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 77
- 0
examples/Bluetooth/Pacman-Teensy-BT/README.md Ver arquivo

@@ -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
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 2403
- 0
examples/Bluetooth/Pacman-Teensy-BT/crpal.h
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


+ 3082
- 0
examples/Bluetooth/Pacman-Teensy-BT/font8x8.cpp
Diferenças do arquivo suprimidas por serem muito extensas
Ver arquivo


BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/apple.png Ver arquivo

Antes Depois
Largura: 16  |  Altura: 16  |  Tamanho: 14KB

BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/bell.png Ver arquivo

Antes Depois
Largura: 16  |  Altura: 16  |  Tamanho: 337B

BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/cherry.png Ver arquivo

Antes Depois
Largura: 16  |  Altura: 16  |  Tamanho: 939B

BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/galaxian.png Ver arquivo

Antes Depois
Largura: 16  |  Altura: 16  |  Tamanho: 947B

BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/grape.png Ver arquivo

Antes Depois
Largura: 16  |  Altura: 16  |  Tamanho: 619B

BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/key.png Ver arquivo

Antes Depois
Largura: 16  |  Altura: 16  |  Tamanho: 913B

BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/peach.png Ver arquivo

Antes Depois
Largura: 16  |  Altura: 16  |  Tamanho: 923B

BIN
examples/Bluetooth/Pacman-Teensy-BT/icons/strawberry.png Ver arquivo

Antes Depois
Largura: 16  |  Altura: 16  |  Tamanho: 942B

examples/Joystick/Joystick.ino → examples/Serial/Joystick/Joystick.ino Ver arquivo


examples/Joystick/Joystick/Joystick.ino → examples/Serial/Joystick/Joystick/Joystick.ino Ver arquivo


examples/Joystick/Joystick/ps4Helpers.ino → examples/Serial/Joystick/Joystick/ps4Helpers.ino Ver arquivo


examples/MIDI/InputFunctions/InputFunctions.ino → examples/Serial/MIDI/InputFunctions/InputFunctions.ino Ver arquivo


examples/MIDI/Interface_16x16/Interface_16x16.ino → examples/Serial/MIDI/Interface_16x16/Interface_16x16.ino Ver arquivo


examples/Mouse/Mouse.ino → examples/Serial/Mouse/Mouse.ino Ver arquivo


examples/Mouse/defs.h → examples/Serial/Mouse/defs.h Ver arquivo


examples/SerialTest/SerialTest.ino → examples/Test/SerialTest/SerialTest.ino Ver arquivo


examples/SerialTest/defs.h → examples/Test/SerialTest/defs.h Ver arquivo


examples/Test/Test.ino → examples/Test/Test/Test.ino Ver arquivo


Carregando…
Cancelar
Salvar