Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactors and Comments #80

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
colorchord2/windows/colorchord.def
colorchord2/colorchord.def
colorchord2/colorchord.def
*.elf
*.bin
*.map
86 changes: 86 additions & 0 deletions embedded8266/.cproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">

<storageModule moduleId="org.eclipse.cdt.core.settings">

<cconfiguration id="cdt.managedbuild.toolchain.gnu.cross.base.992684848">

<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.cross.base.992684848" moduleId="org.eclipse.cdt.core.settings" name="Default">

<externalSettings/>

<extensions>

<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>

<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>

<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>

<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>

<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>

<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>

</extensions>

</storageModule>

<storageModule moduleId="cdtBuildSystem" version="4.0.0">

<configuration buildProperties="" id="cdt.managedbuild.toolchain.gnu.cross.base.992684848" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">

<folderInfo id="cdt.managedbuild.toolchain.gnu.cross.base.992684848.887469936" name="/" resourcePath="">

<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.1478643855" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.base">

<option id="cdt.managedbuild.option.gnu.cross.prefix.587128674" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix"/>

<option id="cdt.managedbuild.option.gnu.cross.path.1557271909" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path"/>

<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.708080269" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>

<builder id="cdt.managedbuild.builder.gnu.cross.1912387866" managedBuildOn="false" name="Gnu Make Builder.Default" superClass="cdt.managedbuild.builder.gnu.cross"/>

<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.665635257" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler"/>

<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1003617856" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler"/>

<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.430798703" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>

<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.937558838" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker"/>

<tool id="cdt.managedbuild.tool.gnu.cross.archiver.845568202" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>

<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1988469694" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler"/>

</toolChain>

</folderInfo>

</configuration>

</storageModule>

<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>

</cconfiguration>

</storageModule>

<storageModule moduleId="cdtBuildSystem" version="4.0.0">

<project id="colorchord.null.406169600" name="colorchord"/>

</storageModule>

<storageModule moduleId="scannerConfiguration">

<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>

</storageModule>

<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>

</cproject>
34 changes: 34 additions & 0 deletions embedded8266/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>colorchord</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
<linkedResources>
<link>
<name>embeddedcommon</name>
<type>2</type>
<location>/home/adam/colorchord/embeddedcommon</location>
</link>
</linkedResources>
</projectDescription>
28 changes: 28 additions & 0 deletions embedded8266/.settings/language.settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project>

<configuration id="cdt.managedbuild.toolchain.gnu.cross.base.992684848" name="Default">

<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">

<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>

<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>

<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>

<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1813065038369671620" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">

<language-scope id="org.eclipse.cdt.core.gcc"/>

<language-scope id="org.eclipse.cdt.core.g++"/>

</provider>

<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>

</extension>

</configuration>

</project>
20 changes: 19 additions & 1 deletion embedded8266/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ESP8266 ColorChord
# ESP8266 ColorChord

## WARNING THIS IS UNDER CONSTRUCTION

Expand Down Expand Up @@ -36,3 +36,21 @@ If you have problems with burning the firmware or transfering page data over net
in `makeconf.inc`. This way the esp checks if the flash is written correctly.
Especially with some ESP-01 modules there has been a problem with the flash
not being written correctly.

## UDP Commands

These commands can be sent to port 7878, defined in user.cfg. Custom commands from custom_commands.c all start with 'C'. All others from commonservices.c do not. The non-custom commands reference can be found at https://github.com/cnlohr/esp82xx#commands

| Command | Name | Description |
| -------------- | ---- | ----------- |
| CB | Bins | Given an integer, return the bins vals in a string over UDP. 0 == embeddedBins32, 1 == fizzed_bins, 3 == folded_bins |
| CL | LEDs | Return the LED values in a string over UDP |
| CM | Oscilloscope | Return the sounddata values in a string over UDP |
| CN | Notes | Return the note peak frequency, peak amplitudes, and jumps in a string over UDP |
| CSD | Config Default | Set all configurables to default values |
| CSR | Config Read | Read all configurables from struct SaveLoad |
| CSS | Config Save | Write all configurables to SPI flash |
| CVR | Colorchord Values Read | Return all configurables in string form over UDP |
| CVW | Colorchord Values Write | Given a name and value pair, set a configurable |

Also there's a UDP server on port 7777 which can set the LEDs. Just send it an array of raw bytes for the LEDs in RGB order. So index 0 is LED1_R, index 1 is LED1_G, index 2 is LED1_B, index 3 is LED2_R, etc. It seems to ignore the first three bytes sent (first LED), but reads three bytes past where the data ends, so that may be a bug.
2 changes: 1 addition & 1 deletion embedded8266/ccconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ struct CCSettings
uint16_t gUSE_NUM_LIN_LEDS; // = NUM_LIN_LEDS
uint16_t gCOLORCHORD_ACTIVE;
uint16_t gCOLORCHORD_OUTPUT_DRIVER;
uint16_t gLED_DRIVER_MODE;
uint16_t gINITIAL_AMP;
uint16_t gLED_DRIVER_MODE;
};

#define CCCONFIG_ADDRESS 0xAF000
Expand Down
Binary file removed embedded8266/image.elf-0x00000.bin
Binary file not shown.
Loading