Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
12,445 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/ |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.0.0) | ||
project(bleepbloopmachine CXX) | ||
add_executable(bleepbloopmachine main.cc) | ||
target_link_arduino_libraries(bleepbloopmachine AUTO_PUBLIC) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
BOARD := pro5v | ||
include /usr/share/arduino/Arduino.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# bleepbloopmachine | ||
|
||
## building | ||
|
||
```sh | ||
mkdir build | ||
cd build | ||
cmake -D CMAKE_TOOLCHAIN_FILE=/home/chee/projects/Arduino-CMake-Toolchain/Arduino-toolchain.cmake | ||
-D CMAKE_EXPORT_COMPILE_COMMANDS=1 .. | ||
ln build/compile_commands.json .. | ||
``` | ||
|
||
then uncomment the pygamer lines in the generated `BoardOptions.cmake`, then run | ||
the cmake command again and run `make` to build it. | ||
|
||
## watching | ||
|
||
if you keep this running, emacs will know about the new includes when you do an lsp-workspace-restart | ||
|
||
```sh | ||
watchexec -e cc,h -w .. 'cmake -D CMAKE_TOOLCHAIN_FILE=/home/chee/projects/Arduino-CMake-Toolchain/Arduino-toolchain.cmake -D CMAKE_EXPORT_COMPILE_COMMANDS=1 ..' | ||
``` |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include "main.h" | ||
|
||
void setup() { | ||
_setup(); | ||
} | ||
|
||
void loop() { | ||
_loop(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/compile_commands.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#include "main.h" | ||
#include <Adafruit_BusIO.h> | ||
#include "Adafruit_SPIFlash.h" | ||
#include "Adafruit_TinyUSB.h" | ||
#include "AudioStream.h" | ||
#include "output_dacs.h" | ||
#include <Adafruit_Arcada.h> | ||
#include <Adafruit_NeoPixel.h> | ||
#include <Arduino.h> | ||
#include <Audio.h> | ||
|
||
Adafruit_Arcada arcada; | ||
|
||
// pygamer specific | ||
Adafruit_NeoPixel neopixels(5, 8, NEO_GRB); | ||
|
||
/* there are only monophonic noises on this one so far :) | ||
* but this will need updated for: | ||
* - chords | ||
* - panning | ||
* - each instrument should perhaps have its own mixer? | ||
AudioMixer4 q_mixer; | ||
AudioMixer4 p_mixer; | ||
AudioMixer4 s_mixer; | ||
AudioMixer4 n_mixer; | ||
*/ | ||
AudioMixer4 mixer; | ||
AudioOutputAnalogStereo headphones; | ||
AudioConnection left_ear_patch(mixer, 0, headphones, 0); | ||
AudioConnection right_ear_patch(mixer, 0, headphones, 1); | ||
|
||
|
||
Adafruit_FlashTransport_QSPI flashTransport; | ||
Adafruit_SPIFlash flash(&flashTransport); | ||
FatFileSystem fatfs; | ||
FatFile root; | ||
FatFile file; | ||
Adafruit_USBD_MSC usb_msc; | ||
|
||
|
||
void setup() { | ||
arcada.arcadaBegin(); | ||
arcada.filesysBeginMSD(); | ||
arcada.displayBegin(); | ||
arcada.setBacklight(255); | ||
arcada.drawBMP((char *)"icon.bmp", 0, 0); | ||
neopixels.begin(); | ||
neopixels.setBrightness(180); | ||
} | ||
|
||
void loop() { | ||
arcada.readButtons(); | ||
uint8_t buttons = arcada.justPressedButtons(); | ||
int16_t joyX = arcada.readJoystickX(); | ||
int16_t joyY = arcada.readJoystickY(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include "main.h" | ||
#include "Arduino.h" | ||
|
||
void setup() { | ||
} | ||
|
||
void loop() { | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"cpu": { | ||
"fqbn": "adafruit:samd:adafruit_pygamer_m4", | ||
"name": "Adafruit PyGamer M4 Express (SAMD51)", | ||
"port": "serial:///dev/ttyACM0" | ||
} | ||
} |
Oops, something went wrong.