-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V.5.0 includes now a serial protocol for communication through USB.
- Loading branch information
Showing
35 changed files
with
11,481 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
4 changes: 4 additions & 0 deletions
4
Documentation/Protocol Description/morse_code_over_packet_protocol.md
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
Binary file added
BIN
+50.9 KB
Documentation/Protocol Description/morse_code_over_packet_protocol.pdf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
# Morserino-32 User Manual | ||
Morserino-32 multi-functional Morse code machine, based on ESP32 | ||
|
||
## User Manual in German and English. | ||
You may submit translations into other languages. If you do so, please translate the *source code* in ASCIIDOC format - if you do so, you can focus on the translation, and the formatting will happen automagically! | ||
|
||
(This documents are copyrighted as Creative Commons, CC BY-NC-SA 3.0 AT) |
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,73 @@ | ||
extends: default | ||
page: | ||
layout: portrait | ||
size: A4 | ||
margin: [1.5cm, 2cm, 1.5cm, 2cm] | ||
margin-inner: 4cm | ||
margin-outer: 2.5cm | ||
title-page: | ||
logo: | ||
image: m32c.png | ||
title: | ||
font-size: 24 | ||
font_color: D32F2F | ||
subtitle: | ||
font-family: Noto Serif | ||
font-size: 28 | ||
font-style: bold | ||
font-color: D32F2F | ||
base: | ||
font-family: Helvetica | ||
font-color: 111111 | ||
font-size: 10.5 | ||
line-height-length: 14 | ||
line-height: $base-line-height-length / $base-font-size | ||
vertical-spacing: $base-line-height-length | ||
heading: | ||
font-family: Helvetica | ||
font-size: 14 | ||
font-style: bold | ||
line-height: 1.2 | ||
margin-bottom: $vertical-spacing | ||
header: | ||
font-size: 10 | ||
font_color: 777777 | ||
height: 1cm | ||
recto: | ||
center: | ||
content: '_{organization}_' | ||
verso: | ||
center: | ||
content: '_{organization}_' | ||
footer: | ||
font-size: 11 | ||
font_color: 444444 | ||
height: 1cm | ||
recto: | ||
right: | ||
content: '{chapter-title} | {page-number}' | ||
left: | ||
content: image:m32c.png[pdfwidth=0.25in] | ||
verso: | ||
left: | ||
content: '{page-number} | {chapter-title}' | ||
right: | ||
content: image:m32c.png[pdfwidth=0.25in] | ||
table: | ||
border-color: 888888 | ||
stripe-background-color: AAAAAA | ||
toc: | ||
font-size: 10 | ||
title: | ||
font-family: Noto Serif | ||
font-size: 24 | ||
dot-leader: | ||
font-color: 888888 | ||
heading: | ||
font-color: D32F2F | ||
h2-font-family: Noto Serif | ||
h2-font-size: 24 | ||
h3-font-size: 18 | ||
h4-font-size: 14 | ||
literal: | ||
background-color: dddddd |
1,139 changes: 1,139 additions & 0 deletions
1,139
Documentation/User Manual/Version 5.x/m32_user-Manual_v5.adoc
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
1,139 changes: 1,139 additions & 0 deletions
1,139
Documentation/User Manual/Version 5.x/m32_user-Manual_v5_de.adoc
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 @@ | ||
48b51c6ddc5497f0d7f3b1e3619a8f95 |
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,129 @@ | ||
/* ClickButton | ||
Based on an Arduino librery by [email protected] that decodes multiple clicks on one button. | ||
Also copes with long clicks and click-and-hold. | ||
Usage: ClickButton buttonObject(pin [LOW/HIGH, [CLICKBTN_PULLUP]]); | ||
where LOW/HIGH denotes active LOW or HIGH button (default is LOW) | ||
CLICKBTN_PULLUP is only possible with active low buttons. | ||
Returned click counts: | ||
A positive number denotes the number of (short) clicks after a released button | ||
A negative number denotes the number of "long" clicks | ||
Copyright (C) 2010,2012, 2013 raron | ||
GNU GPLv3 license | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
Contact: [email protected] | ||
*/ | ||
|
||
#include "ClickButton.h" | ||
|
||
|
||
ClickButton::ClickButton(uint8_t buttonPin) | ||
{ | ||
pin = buttonPin; | ||
activeHigh = LOW; // Assume active-low button | ||
_btnState = !activeHigh; // initial button state in active-high logic | ||
_lastState = _btnState; | ||
_clickCount = 0; | ||
clicks = 0; | ||
depressed = false; | ||
_lastBounceTime= 0; | ||
debounceTime = 20; // Debounce timer in ms | ||
multiclickTime = 250; // Time limit for multi clicks | ||
longClickTime = 1000; // time until long clicks register | ||
pinMode(pin, INPUT); | ||
} | ||
|
||
/* | ||
ClickButton::ClickButton(uint8_t buttonPin, boolean activeType) | ||
{ | ||
pin = buttonPin; | ||
_activeHigh = activeType; | ||
_btnState = !_activeHigh; // initial button state in active-high logic | ||
_lastState = _btnState; | ||
_clickCount = 0; | ||
clicks = 0; | ||
depressed = 0; | ||
_lastBounceTime= 0; | ||
debounceTime = 20; // Debounce timer in ms | ||
multiclickTime = 250; // Time limit for multi clicks | ||
longClickTime = 1000; // time until long clicks register | ||
pinMode(pin, INPUT); | ||
} | ||
ClickButton::ClickButton(uint8_t buttonPin, boolean activeType, boolean internalPullup) | ||
{ | ||
pin = buttonPin; | ||
_activeHigh = activeType; | ||
_btnState = !_activeHigh; // initial button state in active-high logic | ||
_lastState = _btnState; | ||
_clickCount = 0; | ||
clicks = 0; | ||
depressed = 0; | ||
_lastBounceTime= 0; | ||
debounceTime = 20; // Debounce timer in ms | ||
multiclickTime = 250; // Time limit for multi clicks | ||
longClickTime = 1000; // time until "long" click register | ||
pinMode(pin, INPUT); | ||
// Turn on internal pullup resistor if applicable | ||
if (_activeHigh == LOW && internalPullup == CLICKBTN_PULLUP) digitalWrite(pin,HIGH); | ||
} | ||
*/ | ||
|
||
void ClickButton::Update() | ||
{ | ||
long now = (long)millis(); // get current time | ||
_btnState = digitalRead(pin); // current appearant button state | ||
|
||
// Make the button logic active-high in code | ||
if (!activeHigh) _btnState = !_btnState; | ||
|
||
// If the switch changed, due to noise or a button press, reset the debounce timer | ||
if (_btnState != _lastState) _lastBounceTime = now; | ||
|
||
|
||
// debounce the button (Check if a stable, changed state has occured) | ||
if (now - _lastBounceTime > debounceTime && _btnState != depressed) | ||
{ | ||
depressed = _btnState; | ||
if (depressed) _clickCount++; | ||
} | ||
|
||
// If the button released state is stable, report nr of clicks and start new cycle | ||
if (!depressed && (now - _lastBounceTime) > multiclickTime) | ||
{ | ||
// positive count for released buttons | ||
clicks = _clickCount; | ||
_clickCount = 0; | ||
} | ||
|
||
// Check for "long click" | ||
if (depressed && (now - _lastBounceTime > longClickTime)) | ||
{ | ||
// negative count for long clicks | ||
clicks = 0 - _clickCount; | ||
_clickCount = 0; | ||
} | ||
|
||
_lastState = _btnState; | ||
} |
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,36 @@ | ||
#ifndef ClickButton_H | ||
#define ClickButton_H | ||
|
||
#if (ARDUINO < 100) | ||
#include <WProgram.h> | ||
#else | ||
#include <Arduino.h> | ||
#endif | ||
|
||
|
||
//#define CLICKBTN_PULLUP HIGH | ||
|
||
|
||
class ClickButton | ||
{ | ||
public: | ||
ClickButton(uint8_t buttonPin); | ||
// ClickButton(uint8_t buttonPin, boolean active); | ||
// ClickButton(uint8_t buttonPin, boolean active, boolean internalPullup); | ||
void Update(); | ||
int clicks; // button click counts to return | ||
boolean depressed; // the currently debounced button (press) state (presumably it is not sad :) | ||
long debounceTime; | ||
long multiclickTime; | ||
long longClickTime; | ||
uint8_t pin; // Arduino pin connected to the button - now public to chaneg assignement at runtime | ||
boolean activeHigh; // Type of button: Active-low = 0 or active-high = 1 | ||
|
||
private: | ||
boolean _btnState; // Current appearant button state | ||
boolean _lastState; // previous button reading | ||
int _clickCount; // Number of button clicks within multiclickTime milliseconds | ||
long _lastBounceTime; // the last time the button input pin was toggled, due to noise or a press | ||
}; | ||
|
||
#endif |
Oops, something went wrong.