Compare commits
125 Commits
au_updates
...
v1.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ff3f7d9d0 | ||
|
|
b9f75e0c11 | ||
|
|
f462bc0342 | ||
|
|
33962a585d | ||
|
|
d54c5404a8 | ||
|
|
6b775130d1 | ||
|
|
e65893402a | ||
|
|
9096d2ffa2 | ||
|
|
3e76e6e72f | ||
|
|
8b8fd7a9a1 | ||
|
|
164888fd49 | ||
|
|
e8ad7e9c93 | ||
|
|
4f30789e88 | ||
|
|
f369c2ff9a | ||
|
|
25813b7968 | ||
|
|
e10e351e49 | ||
|
|
62e137f8f2 | ||
|
|
9e0db9d537 | ||
|
|
bce0b1e0d8 | ||
|
|
39b543877b | ||
|
|
f5e004fbb3 | ||
|
|
09c9911ba1 | ||
|
|
2b5fbeff4a | ||
|
|
8e35c83185 | ||
|
|
7a07bd3056 | ||
|
|
ad7d729010 | ||
|
|
c9a9320719 | ||
|
|
0ed024cd7d | ||
|
|
07221e2426 | ||
|
|
06cb3f24ed | ||
|
|
2907eaf02e | ||
|
|
0fe34bbbb9 | ||
|
|
6a889580f2 | ||
|
|
d98eafb11a | ||
|
|
705884497a | ||
|
|
b818b73054 | ||
|
|
506d3dfb0c | ||
|
|
a92b011492 | ||
|
|
12c9cdf3d9 | ||
|
|
8c90a134ad | ||
|
|
3c9965fd62 | ||
|
|
868882f81e | ||
|
|
558414d084 | ||
|
|
75e964289c | ||
|
|
fbd1003c44 | ||
|
|
0011026567 | ||
|
|
5f363f1537 | ||
|
|
3a209d8db4 | ||
|
|
9111ba5301 | ||
|
|
c107df93dd | ||
|
|
28f1ff016c | ||
|
|
c97b0801d5 | ||
|
|
edc78a3858 | ||
|
|
807617de83 | ||
|
|
a196501f15 | ||
|
|
c679bec886 | ||
|
|
e55cb9f221 | ||
|
|
8ab7f97cbd | ||
|
|
638369d659 | ||
|
|
e444b4ef4e | ||
|
|
ab7613c8d3 | ||
|
|
a22b814d63 | ||
|
|
45ec01bd31 | ||
|
|
4f1c863487 | ||
|
|
ed136d6fe9 | ||
|
|
6cb8ed68d3 | ||
|
|
cf93050e52 | ||
|
|
888cf9d9fd | ||
|
|
52ac3def7d | ||
|
|
f685e88a42 | ||
|
|
5d4efb9a0f | ||
|
|
6d8813f200 | ||
|
|
4fb55520ea | ||
|
|
26e5aa75a8 | ||
|
|
a2778779d0 | ||
|
|
1f81215577 | ||
|
|
aaee8915b5 | ||
|
|
efca76806c | ||
|
|
1afc2c18f9 | ||
|
|
0721456c28 | ||
|
|
2eea6db437 | ||
|
|
9bcf52ec64 | ||
|
|
7131e46ff0 | ||
|
|
1c29498e44 | ||
|
|
4af33167a0 | ||
|
|
7c67a704c3 | ||
|
|
ed594d3128 | ||
|
|
f30f9003c1 | ||
|
|
167c792116 | ||
|
|
c708b3703a | ||
|
|
1257cb0b4b | ||
|
|
8ebeabe496 | ||
|
|
208087693d | ||
|
|
acc4aebe03 | ||
|
|
5fd0fdf154 | ||
|
|
1aa7f7d224 | ||
|
|
28248365c8 | ||
|
|
26ffcd332b | ||
|
|
77a8c62b78 | ||
|
|
6ff2791963 | ||
|
|
7db28bff0e | ||
|
|
437e750e76 | ||
|
|
2152100873 | ||
|
|
0e9a549f56 | ||
|
|
4a8e9c69e6 | ||
|
|
8e8c88f67c | ||
|
|
13be6810f1 | ||
|
|
80a1741575 | ||
|
|
d2dc9adbc0 | ||
|
|
429e645ad2 | ||
|
|
5689393c11 | ||
|
|
660fe0c602 | ||
|
|
120442533d | ||
|
|
016ad2398a | ||
|
|
8f2115adbc | ||
|
|
2f4d17e4ed | ||
|
|
31eb465ebf | ||
|
|
1117542411 | ||
|
|
55c10c503b | ||
|
|
9b2987de08 | ||
|
|
6a5815d9b5 | ||
|
|
0fd2d484e1 | ||
|
|
fc09429133 | ||
|
|
1c7dbfc4b6 | ||
|
|
7dff74d780 |
1458
I2Cdev_rda.cpp
1458
I2Cdev_rda.cpp
File diff suppressed because it is too large
Load Diff
269
I2Cdev_rda.h
269
I2Cdev_rda.h
@@ -1,269 +0,0 @@
|
||||
// I2Cdev library collection - Main I2C device class header file
|
||||
// Abstracts bit and byte I2C R/W functions into a convenient class
|
||||
// 6/9/2012 by Jeff Rowberg <jeff@rowberg.net>
|
||||
//
|
||||
// Changelog:
|
||||
// 2013-05-06 - add Francesco Ferrara's Fastwire v0.24 implementation with small modifications
|
||||
// 2013-05-05 - fix issue with writing bit values to words (Sasquatch/Farzanegan)
|
||||
// 2012-06-09 - fix major issue with reading > 32 bytes at a time with Arduino Wire
|
||||
// - add compiler warnings when using outdated or IDE or limited I2Cdev implementation
|
||||
// 2011-11-01 - fix write*Bits mask calculation (thanks sasquatch @ Arduino forums)
|
||||
// 2011-10-03 - added automatic Arduino version detection for ease of use
|
||||
// 2011-10-02 - added Gene Knight's NBWire TwoWire class implementation with small modifications
|
||||
// 2011-08-31 - added support for Arduino 1.0 Wire library (methods are different from 0.x)
|
||||
// 2011-08-03 - added optional timeout parameter to read* methods to easily change from default
|
||||
// 2011-08-02 - added support for 16-bit registers
|
||||
// - fixed incorrect Doxygen comments on some methods
|
||||
// - added timeout value for read operations (thanks mem @ Arduino forums)
|
||||
// 2011-07-30 - changed read/write function structures to return success or byte counts
|
||||
// - made all methods static for multi-device memory savings
|
||||
// 2011-07-28 - initial release
|
||||
|
||||
/* ============================================
|
||||
I2Cdev device library code is placed under the MIT license
|
||||
Copyright (c) 2013 Jeff Rowberg
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
===============================================
|
||||
*/
|
||||
|
||||
#ifndef _I2CDEV_RDA_H_
|
||||
#define _I2CDEV_RDA_H_
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// I2C interface implementation setting
|
||||
// -----------------------------------------------------------------------------
|
||||
#define I2CDEV_IMPLEMENTATION I2CDEV_ARDUINO_WIRE
|
||||
//#define I2CDEV_IMPLEMENTATION I2CDEV_BUILTIN_FASTWIRE
|
||||
|
||||
// comment this out if you are using a non-optimal IDE/implementation setting
|
||||
// but want the compiler to shut up about it
|
||||
#define I2CDEV_IMPLEMENTATION_WARNINGS
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// I2C interface implementation options
|
||||
// -----------------------------------------------------------------------------
|
||||
#define I2CDEV_ARDUINO_WIRE 1 // Wire object from Arduino
|
||||
#define I2CDEV_BUILTIN_NBWIRE 2 // Tweaked Wire object from Gene Knight's NBWire project
|
||||
// ^^^ NBWire implementation is still buggy w/some interrupts!
|
||||
#define I2CDEV_BUILTIN_FASTWIRE 3 // FastWire object from Francesco Ferrara's project
|
||||
#define I2CDEV_I2CMASTER_LIBRARY 4 // I2C object from DSSCircuits I2C-Master Library at https://github.com/DSSCircuits/I2C-Master-Library
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Arduino-style "Serial.print" debug constant (uncomment to enable)
|
||||
// -----------------------------------------------------------------------------
|
||||
//#define I2CDEV_SERIAL_DEBUG
|
||||
|
||||
#ifdef ARDUINO
|
||||
#if ARDUINO < 100
|
||||
#include "WProgram.h"
|
||||
#else
|
||||
#include "Arduino.h"
|
||||
#endif
|
||||
#if I2CDEV_IMPLEMENTATION == I2CDEV_ARDUINO_WIRE
|
||||
#include <Wire.h>
|
||||
#endif
|
||||
#if I2CDEV_IMPLEMENTATION == I2CDEV_I2CMASTER_LIBRARY
|
||||
#include <I2C.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// 1000ms default read timeout (modify with "I2Cdev::readTimeout = [ms];")
|
||||
#define I2CDEV_DEFAULT_READ_TIMEOUT 1000
|
||||
|
||||
class I2Cdev {
|
||||
public:
|
||||
I2Cdev();
|
||||
|
||||
static int8_t readBit(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint8_t *data, uint16_t timeout=I2Cdev::readTimeout);
|
||||
static int8_t readBitW(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t *data, uint16_t timeout=I2Cdev::readTimeout);
|
||||
static int8_t readBits(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint8_t *data, uint16_t timeout=I2Cdev::readTimeout);
|
||||
static int8_t readBitsW(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t *data, uint16_t timeout=I2Cdev::readTimeout);
|
||||
static int8_t readByte(uint8_t devAddr, uint8_t regAddr, uint8_t *data, uint16_t timeout=I2Cdev::readTimeout);
|
||||
static int8_t readWord(uint8_t devAddr, uint8_t regAddr, uint16_t *data, uint16_t timeout=I2Cdev::readTimeout);
|
||||
static int8_t readBytes(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint8_t *data, uint16_t timeout=I2Cdev::readTimeout);
|
||||
static int8_t readWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data, uint16_t timeout=I2Cdev::readTimeout);
|
||||
|
||||
static bool writeBit(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint8_t data);
|
||||
static bool writeBitW(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t data);
|
||||
static bool writeBits(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint8_t data);
|
||||
static bool writeBitsW(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t data);
|
||||
static bool writeByte(uint8_t devAddr, uint8_t regAddr, uint8_t data);
|
||||
static bool writeWord(uint8_t devAddr, uint8_t regAddr, uint16_t data);
|
||||
static bool writeBytes(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint8_t *data);
|
||||
static bool writeWords(uint8_t devAddr, uint8_t regAddr, uint8_t length, uint16_t *data);
|
||||
|
||||
static uint16_t readTimeout;
|
||||
};
|
||||
|
||||
#if I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_FASTWIRE
|
||||
//////////////////////
|
||||
// FastWire 0.24
|
||||
// This is a library to help faster programs to read I2C devices.
|
||||
// Copyright(C) 2012
|
||||
// Francesco Ferrara
|
||||
//////////////////////
|
||||
|
||||
/* Master */
|
||||
#define TW_START 0x08
|
||||
#define TW_REP_START 0x10
|
||||
|
||||
/* Master Transmitter */
|
||||
#define TW_MT_SLA_ACK 0x18
|
||||
#define TW_MT_SLA_NACK 0x20
|
||||
#define TW_MT_DATA_ACK 0x28
|
||||
#define TW_MT_DATA_NACK 0x30
|
||||
#define TW_MT_ARB_LOST 0x38
|
||||
|
||||
/* Master Receiver */
|
||||
#define TW_MR_ARB_LOST 0x38
|
||||
#define TW_MR_SLA_ACK 0x40
|
||||
#define TW_MR_SLA_NACK 0x48
|
||||
#define TW_MR_DATA_ACK 0x50
|
||||
#define TW_MR_DATA_NACK 0x58
|
||||
|
||||
#define TW_OK 0
|
||||
#define TW_ERROR 1
|
||||
|
||||
class Fastwire {
|
||||
private:
|
||||
static boolean waitInt();
|
||||
|
||||
public:
|
||||
static void setup(int khz, boolean pullup);
|
||||
static byte beginTransmission(byte device);
|
||||
static byte write(byte value);
|
||||
static byte writeBuf(byte device, byte address, byte *data, byte num);
|
||||
static byte readBuf(byte device, byte address, byte *data, byte num);
|
||||
static void reset();
|
||||
static byte stop();
|
||||
};
|
||||
#endif
|
||||
|
||||
#if I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_NBWIRE
|
||||
// NBWire implementation based heavily on code by Gene Knight <Gene@Telobot.com>
|
||||
// Originally posted on the Arduino forum at http://arduino.cc/forum/index.php/topic,70705.0.html
|
||||
// Originally offered to the i2cdevlib project at http://arduino.cc/forum/index.php/topic,68210.30.html
|
||||
|
||||
#define NBWIRE_BUFFER_LENGTH 32
|
||||
|
||||
class TwoWire {
|
||||
private:
|
||||
static uint8_t rxBuffer[];
|
||||
static uint8_t rxBufferIndex;
|
||||
static uint8_t rxBufferLength;
|
||||
|
||||
static uint8_t txAddress;
|
||||
static uint8_t txBuffer[];
|
||||
static uint8_t txBufferIndex;
|
||||
static uint8_t txBufferLength;
|
||||
|
||||
// static uint8_t transmitting;
|
||||
static void (*user_onRequest)(void);
|
||||
static void (*user_onReceive)(int);
|
||||
static void onRequestService(void);
|
||||
static void onReceiveService(uint8_t*, int);
|
||||
|
||||
public:
|
||||
TwoWire();
|
||||
void begin();
|
||||
void begin(uint8_t);
|
||||
void begin(int);
|
||||
void beginTransmission(uint8_t);
|
||||
//void beginTransmission(int);
|
||||
uint8_t endTransmission(uint16_t timeout=0);
|
||||
void nbendTransmission(void (*function)(int)) ;
|
||||
uint8_t requestFrom(uint8_t, int, uint16_t timeout=0);
|
||||
//uint8_t requestFrom(int, int);
|
||||
void nbrequestFrom(uint8_t, int, void (*function)(int));
|
||||
void send(uint8_t);
|
||||
void send(uint8_t*, uint8_t);
|
||||
//void send(int);
|
||||
void send(char*);
|
||||
uint8_t available(void);
|
||||
uint8_t receive(void);
|
||||
void onReceive(void (*)(int));
|
||||
void onRequest(void (*)(void));
|
||||
};
|
||||
|
||||
#define TWI_READY 0
|
||||
#define TWI_MRX 1
|
||||
#define TWI_MTX 2
|
||||
#define TWI_SRX 3
|
||||
#define TWI_STX 4
|
||||
|
||||
#define TW_WRITE 0
|
||||
#define TW_READ 1
|
||||
|
||||
#define TW_MT_SLA_NACK 0x20
|
||||
#define TW_MT_DATA_NACK 0x30
|
||||
|
||||
#define CPU_FREQ 16000000L
|
||||
#define TWI_FREQ 100000L
|
||||
#define TWI_BUFFER_LENGTH 32
|
||||
|
||||
/* TWI Status is in TWSR, in the top 5 bits: TWS7 - TWS3 */
|
||||
|
||||
#define TW_STATUS_MASK (_BV(TWS7)|_BV(TWS6)|_BV(TWS5)|_BV(TWS4)|_BV(TWS3))
|
||||
#define TW_STATUS (TWSR & TW_STATUS_MASK)
|
||||
#define TW_START 0x08
|
||||
#define TW_REP_START 0x10
|
||||
#define TW_MT_SLA_ACK 0x18
|
||||
#define TW_MT_SLA_NACK 0x20
|
||||
#define TW_MT_DATA_ACK 0x28
|
||||
#define TW_MT_DATA_NACK 0x30
|
||||
#define TW_MT_ARB_LOST 0x38
|
||||
#define TW_MR_ARB_LOST 0x38
|
||||
#define TW_MR_SLA_ACK 0x40
|
||||
#define TW_MR_SLA_NACK 0x48
|
||||
#define TW_MR_DATA_ACK 0x50
|
||||
#define TW_MR_DATA_NACK 0x58
|
||||
#define TW_ST_SLA_ACK 0xA8
|
||||
#define TW_ST_ARB_LOST_SLA_ACK 0xB0
|
||||
#define TW_ST_DATA_ACK 0xB8
|
||||
#define TW_ST_DATA_NACK 0xC0
|
||||
#define TW_ST_LAST_DATA 0xC8
|
||||
#define TW_SR_SLA_ACK 0x60
|
||||
#define TW_SR_ARB_LOST_SLA_ACK 0x68
|
||||
#define TW_SR_GCALL_ACK 0x70
|
||||
#define TW_SR_ARB_LOST_GCALL_ACK 0x78
|
||||
#define TW_SR_DATA_ACK 0x80
|
||||
#define TW_SR_DATA_NACK 0x88
|
||||
#define TW_SR_GCALL_DATA_ACK 0x90
|
||||
#define TW_SR_GCALL_DATA_NACK 0x98
|
||||
#define TW_SR_STOP 0xA0
|
||||
#define TW_NO_INFO 0xF8
|
||||
#define TW_BUS_ERROR 0x00
|
||||
|
||||
//#define _MMIO_BYTE(mem_addr) (*(volatile uint8_t *)(mem_addr))
|
||||
//#define _SFR_BYTE(sfr) _MMIO_BYTE(_SFR_ADDR(sfr))
|
||||
|
||||
#ifndef sbi // set bit
|
||||
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
|
||||
#endif // sbi
|
||||
|
||||
#ifndef cbi // clear bit
|
||||
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
|
||||
#endif // cbi
|
||||
|
||||
extern TwoWire Wire;
|
||||
|
||||
#endif // I2CDEV_IMPLEMENTATION == I2CDEV_BUILTIN_NBWIRE
|
||||
|
||||
#endif /* _I2CDEV_RDA_H_ */
|
||||
19
README.md
19
README.md
@@ -1,4 +1,21 @@
|
||||
# HamShield
|
||||
HamShield Arduino Library and Example Sketches
|
||||
|
||||
The master branch is intended for use with HamShield hardware -09 and above.
|
||||
|
||||
WARNING: The dev branch is not guaranteed to work. Please use caution if you choose to use that branch.
|
||||
|
||||
# HamShield Arduino Library and Example Sketches
|
||||
|
||||
This repository is meant to be checked out into your Arduino application's libraries folder. After reloading the application, the library and example sketches should be available for use.
|
||||
|
||||
For overview, help, tricks, tips, and more, check out the wiki:
|
||||
|
||||
https://github.com/EnhancedRadioDevices/HamShield/wiki
|
||||
|
||||
# KISS and AFSK
|
||||
|
||||
We've moved the KISS and AFSK code to a separate library to help keep memory usage in simple sketches down. To use the AFSK examples, please also install these libraries:
|
||||
|
||||
- https://github.com/EnhancedRadioDevices/DDS
|
||||
- https://github.com/EnhancedRadioDevices/HamShield_KISS
|
||||
|
||||
|
||||
128
examples/AFSK_PacketTester/AFSK_PacketTester.ino
Normal file
128
examples/AFSK_PacketTester/AFSK_PacketTester.ino
Normal file
@@ -0,0 +1,128 @@
|
||||
/* Hamshield
|
||||
* Example: AFSK Packet Tester
|
||||
* This example sends AFSK test data. You will need a seperate
|
||||
* AFSK receiver to test the output of this example.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Connect the Arduino to wall
|
||||
* power and then to your computer via USB. After uploading
|
||||
* this program to your Arduino, open the Serial Monitor to
|
||||
* monitor the process of the HamShield. Check for output on
|
||||
* AFSK receiver.
|
||||
|
||||
* Note: add message receive code
|
||||
*/
|
||||
|
||||
#define DDS_REFCLK_DEFAULT 9600
|
||||
|
||||
#include <HamShield.h>
|
||||
#include <DDS.h>
|
||||
#include <packet.h>
|
||||
#include <avr/wdt.h>
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
HamShield radio;
|
||||
DDS dds;
|
||||
AFSK afsk;
|
||||
String messagebuff = "";
|
||||
String origin_call = "";
|
||||
String destination_call = "";
|
||||
String textmessage = "";
|
||||
int msgptr = 0;
|
||||
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
// turn on pwr to the radio
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
Serial.begin(9600);
|
||||
|
||||
radio.initialize();
|
||||
radio.frequency(144390);
|
||||
radio.setRfPower(0);
|
||||
dds.start();
|
||||
afsk.start(&dds);
|
||||
delay(100);
|
||||
Serial.println("HELLO");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
messagebuff = "KC7IBT,KC7IBT,:HAMSHIELD TEST";
|
||||
prepMessage();
|
||||
delay(10000);
|
||||
}
|
||||
|
||||
void prepMessage() {
|
||||
radio.setModeTransmit();
|
||||
delay(500);
|
||||
origin_call = messagebuff.substring(0,messagebuff.indexOf(',')); // get originating callsign
|
||||
destination_call = messagebuff.substring(messagebuff.indexOf(',')+1,messagebuff.indexOf(',',messagebuff.indexOf(',')+1)); // get the destination call
|
||||
textmessage = messagebuff.substring(messagebuff.indexOf(":")+1);
|
||||
|
||||
Serial.print("From: "); Serial.print(origin_call); Serial.print(" To: "); Serial.println(destination_call); Serial.println("Text: "); Serial.println(textmessage);
|
||||
|
||||
AFSK::Packet *packet = AFSK::PacketBuffer::makePacket(22 + 32);
|
||||
|
||||
packet->start();
|
||||
packet->appendCallsign(origin_call.c_str(),0);
|
||||
packet->appendCallsign(destination_call.c_str(),15,true);
|
||||
packet->appendFCS(0x03);
|
||||
packet->appendFCS(0xf0);
|
||||
packet->print(textmessage);
|
||||
packet->finish();
|
||||
|
||||
bool ret = afsk.putTXPacket(packet);
|
||||
|
||||
if(afsk.txReady()) {
|
||||
Serial.println(F("txReady"));
|
||||
radio.setModeTransmit();
|
||||
//delay(100);
|
||||
if(afsk.txStart()) {
|
||||
Serial.println(F("txStart"));
|
||||
} else {
|
||||
radio.setModeReceive();
|
||||
}
|
||||
}
|
||||
// Wait 2 seconds before we send our beacon again.
|
||||
Serial.println("tick");
|
||||
// Wait up to 2.5 seconds to finish sending, and stop transmitter.
|
||||
// TODO: This is hackery.
|
||||
for(int i = 0; i < 500; i++) {
|
||||
if(afsk.encoder.isDone())
|
||||
break;
|
||||
delay(50);
|
||||
}
|
||||
Serial.println("Done sending");
|
||||
radio.setModeReceive();
|
||||
}
|
||||
|
||||
ISR(TIMER2_OVF_vect) {
|
||||
TIFR2 = _BV(TOV2);
|
||||
static uint8_t tcnt = 0;
|
||||
if(++tcnt == 8) {
|
||||
dds.clockTick();
|
||||
tcnt = 0;
|
||||
}
|
||||
}
|
||||
|
||||
ISR(ADC_vect) {
|
||||
static uint8_t tcnt = 0;
|
||||
TIFR1 = _BV(ICF1); // Clear the timer flag
|
||||
dds.clockTick();
|
||||
if(++tcnt == 1) {
|
||||
if(afsk.encoder.isSending()) {
|
||||
afsk.timer();
|
||||
}
|
||||
tcnt = 0;
|
||||
}
|
||||
}
|
||||
158
examples/AFSK_SerialMessenger/AFSK_SerialMessenger.ino
Normal file
158
examples/AFSK_SerialMessenger/AFSK_SerialMessenger.ino
Normal file
@@ -0,0 +1,158 @@
|
||||
/* Hamshield
|
||||
* Example: AFSK Serial Messenger
|
||||
* Serial glue to send messages over APRS. You will need a
|
||||
* seperate AFSK receiver to test the output of this example.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. After uploading this program
|
||||
* to your Arduino, open the Serial Monitor to monitor. Type
|
||||
* a message under 254 characters into the bar at the top of
|
||||
* the monitor. Click the "Send" button. Check for output on
|
||||
* AFSK receiver.
|
||||
|
||||
* NOTE: add message receive code
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <HamShield.h>
|
||||
#include <DDS.h>
|
||||
#include <packet.h>
|
||||
#include <avr/wdt.h>
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
HamShield radio;
|
||||
DDS dds;
|
||||
AFSK afsk;
|
||||
String messagebuff = "";
|
||||
String origin_call = "";
|
||||
String destination_call = "";
|
||||
String textmessage = "";
|
||||
int msgptr = 0;
|
||||
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
// turn on the radio
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
Serial.begin(9600);
|
||||
|
||||
radio.initialize();
|
||||
radio.frequency(145570);
|
||||
radio.setRfPower(0);
|
||||
radio.setVolume1(0xFF);
|
||||
radio.setVolume2(0xFF);
|
||||
radio.setSQHiThresh(-100);
|
||||
radio.setSQLoThresh(-100);
|
||||
radio.setSQOn();
|
||||
dds.start();
|
||||
afsk.start(&dds);
|
||||
delay(100);
|
||||
radio.setModeReceive();
|
||||
Serial.println("HELLO");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
if(Serial.available()) {
|
||||
char temp = (char)Serial.read();
|
||||
if(temp == '`') {
|
||||
//Serial.println(messagebuff);
|
||||
prepMessage();
|
||||
msgptr = 0;
|
||||
Serial.print("!!");
|
||||
}
|
||||
else {
|
||||
messagebuff += temp;
|
||||
msgptr++;
|
||||
}
|
||||
}
|
||||
if(msgptr > 254) { messagebuff = ""; Serial.print("X!"); }
|
||||
|
||||
if(afsk.decoder.read() || afsk.rxPacketCount()) {
|
||||
// A true return means something was put onto the packet FIFO
|
||||
// If we actually have data packets in the buffer, process them all now
|
||||
while(afsk.rxPacketCount()) {
|
||||
AFSK::Packet *packet = afsk.getRXPacket();
|
||||
Serial.print(F("Packet: "));
|
||||
if(packet) {
|
||||
packet->printPacket(&Serial);
|
||||
AFSK::PacketBuffer::freePacket(packet);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void prepMessage() {
|
||||
radio.setModeTransmit();
|
||||
delay(1000);
|
||||
origin_call = messagebuff.substring(0,messagebuff.indexOf(',')); // get originating callsign
|
||||
destination_call = messagebuff.substring(messagebuff.indexOf(',')+1,messagebuff.indexOf(',',messagebuff.indexOf(',')+1)); // get the destination call
|
||||
textmessage = messagebuff.substring(messagebuff.indexOf(":")+1);
|
||||
|
||||
// Serial.print("From: "); Serial.print(origin_call); Serial.print(" To: "); Serial.println(destination_call); Serial.println("Text: "); Serial.println(textmessage);
|
||||
|
||||
AFSK::Packet *packet = AFSK::PacketBuffer::makePacket(22 + 32);
|
||||
|
||||
packet->start();
|
||||
packet->appendCallsign(origin_call.c_str(),0);
|
||||
packet->appendCallsign(destination_call.c_str(),15,true);
|
||||
packet->appendFCS(0x03);
|
||||
packet->appendFCS(0xf0);
|
||||
packet->print(textmessage);
|
||||
packet->finish();
|
||||
|
||||
bool ret = afsk.putTXPacket(packet);
|
||||
|
||||
if(afsk.txReady()) {
|
||||
Serial.println(F("txReady"));
|
||||
radio.setModeTransmit();
|
||||
//delay(100);
|
||||
if(afsk.txStart()) {
|
||||
Serial.println(F("txStart"));
|
||||
} else {
|
||||
radio.setModeReceive();
|
||||
}
|
||||
}
|
||||
// Wait 2 seconds before we send our beacon again.
|
||||
Serial.println("tick");
|
||||
// Wait up to 2.5 seconds to finish sending, and stop transmitter.
|
||||
// TODO: This is hackery.
|
||||
for(int i = 0; i < 500; i++) {
|
||||
if(afsk.encoder.isDone())
|
||||
break;
|
||||
delay(50);
|
||||
}
|
||||
Serial.println("Done sending");
|
||||
radio.setModeReceive();
|
||||
}
|
||||
|
||||
|
||||
ISR(TIMER2_OVF_vect) {
|
||||
TIFR2 = _BV(TOV2);
|
||||
static uint8_t tcnt = 0;
|
||||
if(++tcnt == 8) {
|
||||
dds.clockTick();
|
||||
tcnt = 0;
|
||||
}
|
||||
}
|
||||
|
||||
ISR(ADC_vect) {
|
||||
static uint8_t tcnt = 0;
|
||||
TIFR1 = _BV(ICF1); // Clear the timer flag
|
||||
dds.clockTick();
|
||||
if(++tcnt == 1) {
|
||||
afsk.timer();
|
||||
tcnt = 0;
|
||||
}
|
||||
}
|
||||
13
examples/APRSMessenger/background.js
Executable file
13
examples/APRSMessenger/background.js
Executable file
@@ -0,0 +1,13 @@
|
||||
chrome.app.runtime.onLaunched.addListener(function() {
|
||||
chrome.app.window.create("window.html", {
|
||||
"bounds": {
|
||||
"width": 685,
|
||||
"height": 800
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$( "#tabs" ).tabs();
|
||||
});
|
||||
|
||||
BIN
examples/APRSMessenger/bars-0.png
Normal file
BIN
examples/APRSMessenger/bars-0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
examples/APRSMessenger/bars-1.png
Normal file
BIN
examples/APRSMessenger/bars-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
examples/APRSMessenger/bars-2.png
Normal file
BIN
examples/APRSMessenger/bars-2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
examples/APRSMessenger/bars-3.png
Normal file
BIN
examples/APRSMessenger/bars-3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
9789
examples/APRSMessenger/jquery-1.10.2.js
vendored
Normal file
9789
examples/APRSMessenger/jquery-1.10.2.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1225
examples/APRSMessenger/jquery-ui.css
vendored
Normal file
1225
examples/APRSMessenger/jquery-ui.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
16617
examples/APRSMessenger/jquery-ui.js
vendored
Normal file
16617
examples/APRSMessenger/jquery-ui.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
examples/APRSMessenger/manifest.json
Executable file
10
examples/APRSMessenger/manifest.json
Executable file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "HamShield",
|
||||
"description": "HamShield",
|
||||
"version": "1.0.0",
|
||||
"app": {
|
||||
"background": {
|
||||
"scripts": ["background.js"]
|
||||
}
|
||||
}
|
||||
}
|
||||
1
examples/APRSMessenger/project.ps
Executable file
1
examples/APRSMessenger/project.ps
Executable file
@@ -0,0 +1 @@
|
||||
chromeApp
|
||||
48
examples/APRSMessenger/styles.css
Executable file
48
examples/APRSMessenger/styles.css
Executable file
@@ -0,0 +1,48 @@
|
||||
body{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.btn {
|
||||
background: #adadad;
|
||||
background-image: -webkit-linear-gradient(top, #adadad, #3d3d3d);
|
||||
background-image: -moz-linear-gradient(top, #adadad, #3d3d3d);
|
||||
background-image: -ms-linear-gradient(top, #adadad, #3d3d3d);
|
||||
background-image: -o-linear-gradient(top, #adadad, #3d3d3d);
|
||||
background-image: linear-gradient(to bottom, #adadad, #3d3d3d);
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0px;
|
||||
font-family: Arial;
|
||||
color: #ffffff;
|
||||
font-size: 20px;
|
||||
padding: 10px 20px 10px 20px;
|
||||
text-decoration: none;
|
||||
float: left;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background: #3d3d3d;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.lcd {
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0px;
|
||||
font-family: Courier New;
|
||||
color: #00ff00;
|
||||
font-size: 50px;
|
||||
background: #000000;
|
||||
padding: 10px 20px 10px 20px;
|
||||
text-decoration: none;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
.lcd:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.bs1 { width: 50px; }
|
||||
.bs2 { width: 100px; }
|
||||
.bs3 { width: 200px; }
|
||||
61
examples/APRSMessenger/window.html
Executable file
61
examples/APRSMessenger/window.html
Executable file
@@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
<meta charset="utf-8">
|
||||
<title>APRSMessenger</title>
|
||||
<link rel="stylesheet" href="jquery-ui.css">
|
||||
<script src="jquery-1.10.2.js"></script>
|
||||
<script src="jquery-ui.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="lcd" style="width: 768px">
|
||||
144.390 MHz | APRS | <img src="bars-3.png" style="height: 32px; width: 32px;">
|
||||
</div>
|
||||
<div class="lcd" style="width: 768px; font-size: 15px;">
|
||||
2M | BW: 25KHz | TX CTCSS: OFF | RX CTCSS: OFF | Filter: OFF | Presence: Available
|
||||
</div>
|
||||
<div class="btn" style="width: 75px">
|
||||
Tune
|
||||
</div>
|
||||
<div class="btn">
|
||||
Presence
|
||||
</div>
|
||||
<div class="btn">
|
||||
GPS
|
||||
</div>
|
||||
<div class="btn">
|
||||
SSTV
|
||||
</div>
|
||||
<div class="btn">
|
||||
WX
|
||||
</div>
|
||||
<div class="btn">
|
||||
MSG
|
||||
</div>
|
||||
<div class="btn">
|
||||
SQ-
|
||||
</div>
|
||||
<div class="btn">
|
||||
SQ+
|
||||
</div>
|
||||
<div class="btn">
|
||||
VOL
|
||||
</div>
|
||||
<br/><br/>
|
||||
<div id="tabs">
|
||||
<ul>
|
||||
<li><a href="#tabs-1">Console</a></li>
|
||||
<li><a href="#tabs-2">KG7OGM</a></li>
|
||||
<li><a href="#tabs-3">KC7IBT</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="tabs-1">
|
||||
Debug messages
|
||||
</div>
|
||||
<div id="tabs-2">
|
||||
</div>
|
||||
<div id="tabs-3">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
0
examples/APRS-Beacon/1200.wav → examples/APRS_Beacon/1200.wav
Executable file → Normal file
0
examples/APRS-Beacon/1200.wav → examples/APRS_Beacon/1200.wav
Executable file → Normal file
0
examples/APRS-Beacon/2200.wav → examples/APRS_Beacon/2200.wav
Executable file → Normal file
0
examples/APRS-Beacon/2200.wav → examples/APRS_Beacon/2200.wav
Executable file → Normal file
92
examples/AX25Receive/AX25Receive.ino
Normal file
92
examples/AX25Receive/AX25Receive.ino
Normal file
@@ -0,0 +1,92 @@
|
||||
/* Hamshield
|
||||
* Example: AX25 Receive
|
||||
* This example receives AFSK test data. You will need seperate
|
||||
* AFSK equipment to send data for this example.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Plug a pair of headphones into
|
||||
* the HamShield. Connect the Arduino to wall power and then to
|
||||
* your computer via USB. After uploading this program to your
|
||||
* Arduino, open the Serial Monitor so you will see the AFSK
|
||||
* packet. Send AFSK packet from AFSK equipment at 145.01MHz.
|
||||
|
||||
* Note: add message receive code
|
||||
*/
|
||||
|
||||
#include <HamShield.h>
|
||||
#include <DDS.h>
|
||||
#include <packet.h>
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
HamShield radio;
|
||||
DDS dds;
|
||||
AFSK afsk;
|
||||
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
// turn on radio
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
Serial.begin(9600);
|
||||
|
||||
Serial.println(F("Radio test connection"));
|
||||
Serial.println(radio.testConnection(), DEC);
|
||||
Serial.println(F("Initialize"));
|
||||
delay(100);
|
||||
radio.initialize();
|
||||
radio.frequency(145010);
|
||||
radio.setSQOff();
|
||||
Serial.println(F("Frequency"));
|
||||
Serial.println(radio.getFrequency());
|
||||
delay(100);
|
||||
Serial.print(F("Squelch(H/L): "));
|
||||
Serial.print(radio.getSQHiThresh());
|
||||
Serial.print(F(" / "));
|
||||
Serial.println(radio.getSQLoThresh());
|
||||
radio.setModeReceive();
|
||||
Serial.println(F("DDS Start"));
|
||||
delay(100);
|
||||
dds.start();
|
||||
Serial.println(F("AFSK start"));
|
||||
delay(100);
|
||||
afsk.start(&dds);
|
||||
Serial.println(F("Starting..."));
|
||||
delay(100);
|
||||
dds.setAmplitude(255);
|
||||
}
|
||||
|
||||
uint32_t last = 0;
|
||||
void loop() {
|
||||
if(afsk.decoder.read() || afsk.rxPacketCount()) {
|
||||
// A true return means something was put onto the packet FIFO
|
||||
// If we actually have data packets in the buffer, process them all now
|
||||
while(afsk.rxPacketCount()) {
|
||||
AFSK::Packet *packet = afsk.getRXPacket();
|
||||
Serial.print(F("Packet: "));
|
||||
if(packet) {
|
||||
packet->printPacket(&Serial);
|
||||
AFSK::PacketBuffer::freePacket(packet);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: d2 is the switch input, so remove this
|
||||
ISR(ADC_vect) {
|
||||
static uint8_t tcnt = 0;
|
||||
TIFR1 = _BV(ICF1); // Clear the timer flag
|
||||
//PORTD |= _BV(2); // Diagnostic pin (D2)
|
||||
//dds.clockTick();
|
||||
afsk.timer();
|
||||
//PORTD &= ~(_BV(2)); // Pin D2 off again
|
||||
}
|
||||
282
examples/CrystalCalibration/CrystalCalibration.ino
Normal file
282
examples/CrystalCalibration/CrystalCalibration.ino
Normal file
@@ -0,0 +1,282 @@
|
||||
/* Hamshield
|
||||
* Example: Crystal Calibration
|
||||
* This example allows you to calibrate the crystal clock
|
||||
* through the Arduino Serial Monitor.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Connect the Arduino to wall
|
||||
* power and then to your computer via USB. After uploading
|
||||
* this program to your Arduino, open the Serial Monitor.
|
||||
* Type 'h' into the bar at the top of the Serial Monitor
|
||||
* and click the "Send" button for more instructions.
|
||||
*/
|
||||
|
||||
#define DDS_REFCLK_DEFAULT 38400
|
||||
#define DDS_REFCLK_OFFSET 0
|
||||
#define DDS_DEBUG_SERIAL
|
||||
|
||||
#include <HamShield.h>
|
||||
#include <DDS.h>
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
HamShield radio;
|
||||
DDS dds;
|
||||
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
// turn on radio
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
Serial.begin(9600);
|
||||
|
||||
radio.initialize();
|
||||
radio.setRfPower(0);
|
||||
radio.frequency(145050);
|
||||
|
||||
dds.start();
|
||||
dds.setFrequency(1200);
|
||||
dds.on();
|
||||
|
||||
radio.bypassPreDeEmph();
|
||||
}
|
||||
|
||||
enum Sets {
|
||||
SET_REF,
|
||||
SET_TONE,
|
||||
SET_AMPLITUDE,
|
||||
SET_ADC_HALF,
|
||||
SET_OFFSET
|
||||
} setting = SET_TONE;
|
||||
|
||||
char freqBuffer[8];
|
||||
char *freqBufferPtr = freqBuffer;
|
||||
uint16_t lastFreq = 1200;
|
||||
|
||||
volatile uint16_t recordedPulseLength;
|
||||
volatile bool recordedPulse = false;
|
||||
volatile bool listening = false;
|
||||
volatile uint8_t maxADC = 0, minADC = 255, adcHalf = 40;
|
||||
|
||||
void loop() {
|
||||
static uint16_t samples = 0;
|
||||
static uint16_t pulse;
|
||||
static uint32_t lastOutput = 0;
|
||||
static float pulseFloat = 0.0;
|
||||
if(recordedPulse) {
|
||||
uint32_t pulseAveraging;
|
||||
uint16_t tmpPulse;
|
||||
cli();
|
||||
recordedPulse = false;
|
||||
tmpPulse = recordedPulseLength;
|
||||
sei();
|
||||
if(samples++ == 0) {
|
||||
pulse = tmpPulse;
|
||||
//pulseFloat = tmpPulse;
|
||||
} else {
|
||||
pulseAveraging = (pulse + tmpPulse) >> 1;
|
||||
pulse = pulseAveraging;
|
||||
pulseFloat = pulseFloat + 0.01*((float)pulse-pulseFloat);
|
||||
}
|
||||
if((lastOutput + 1000) < millis()) {
|
||||
Serial.print(F("Pulse: "));
|
||||
Serial.println(pulse);
|
||||
Serial.print(F("Last: "));
|
||||
Serial.println(tmpPulse);
|
||||
Serial.print(F("Samples: "));
|
||||
Serial.println(samples);
|
||||
Serial.print(F("ADC M/M: "));
|
||||
Serial.print(minADC); minADC = 255;
|
||||
Serial.print(F(" / "));
|
||||
Serial.println(maxADC); maxADC = 0;
|
||||
Serial.print(F("Freq: "));
|
||||
// F = 1/(pulse*(1/ref))
|
||||
// F = ref/pulse
|
||||
Serial.print((float)((float)dds.getReferenceClock()+(float)dds.getReferenceOffset())/(float)pulse);
|
||||
Serial.print(F(" / "));
|
||||
Serial.print((float)((float)dds.getReferenceClock()+(float)dds.getReferenceOffset())/pulseFloat);
|
||||
Serial.print(F(" / "));
|
||||
Serial.println(pulseFloat);
|
||||
Serial.print(F("Freq2: "));
|
||||
// F = 1/(pulse*(1/ref))
|
||||
// F = ref/pulse
|
||||
Serial.print((float)dds.getReferenceClock()/(float)pulse);
|
||||
Serial.print(F(" / "));
|
||||
Serial.println((float)dds.getReferenceClock()/pulseFloat);
|
||||
samples = 0;
|
||||
lastOutput = millis();
|
||||
}
|
||||
}
|
||||
while(Serial.available()) {
|
||||
char c = Serial.read();
|
||||
Serial.println(c);
|
||||
switch(c) {
|
||||
case 'h':
|
||||
Serial.println(F("Commands:"));
|
||||
Serial.println(F("RefClk: u = +10, U = +100, r XXXX = XXXX"));
|
||||
Serial.println(F(" d = -10, D = -100"));
|
||||
Serial.println(F("Offset: s XXX = Set refclk offset"));
|
||||
Serial.println(F("Radio: T = transmit, R = receive"));
|
||||
Serial.println(F("Tone: t XXXX = XXXX Hz"));
|
||||
Serial.println(F("Amp.: a XXX = XXX out of 255"));
|
||||
Serial.println(F("DDS: o = On, O = Off"));
|
||||
Serial.println(F("Input: l = Determine received frequency, L = stop"));
|
||||
Serial.println(F("ADC: m XXX = Set ADC midpoint (zero crossing level)"));
|
||||
Serial.println(F("ie. a 31 = 32/255 amplitude, r38400 sets 38400Hz refclk"));
|
||||
Serial.println("> ");
|
||||
break;
|
||||
case 'u':
|
||||
dds.setReferenceClock(dds.getReferenceClock()+10);
|
||||
dds.setFrequency(lastFreq);
|
||||
dds.start();
|
||||
Serial.println(F("RefClk + 10 = "));
|
||||
Serial.println(dds.getReferenceClock());
|
||||
Serial.println("> ");
|
||||
break;
|
||||
case 'U':
|
||||
dds.setReferenceClock(dds.getReferenceClock()+100);
|
||||
dds.setFrequency(lastFreq);
|
||||
dds.start();
|
||||
Serial.println(F("RefClk + 100 = "));
|
||||
Serial.println(dds.getReferenceClock());
|
||||
Serial.println("> ");
|
||||
break;
|
||||
case 'd':
|
||||
dds.setReferenceClock(dds.getReferenceClock()-10);
|
||||
dds.setFrequency(lastFreq);
|
||||
dds.start();
|
||||
Serial.println(F("RefClk - 10 = "));
|
||||
Serial.println(dds.getReferenceClock());
|
||||
Serial.println("> ");
|
||||
break;
|
||||
case 'D':
|
||||
dds.setReferenceClock(dds.getReferenceClock()-100);
|
||||
dds.setFrequency(lastFreq);
|
||||
dds.start();
|
||||
Serial.println(F("RefClk - 100 = "));
|
||||
Serial.println(dds.getReferenceClock());
|
||||
Serial.println("> ");
|
||||
break;
|
||||
case 'l':
|
||||
Serial.println(F("Start frequency listening, DDS off"));
|
||||
dds.off();
|
||||
listening = true;
|
||||
lastOutput = millis();
|
||||
Serial.println("> ");
|
||||
break;
|
||||
case 'L':
|
||||
Serial.println(F("Stop frequency listening, DDS on"));
|
||||
listening = false;
|
||||
samples = 0;
|
||||
dds.on();
|
||||
Serial.println("> ");
|
||||
break;
|
||||
case 'T':
|
||||
Serial.println(F("Radio transmit"));
|
||||
radio.setModeTransmit();
|
||||
Serial.println("> ");
|
||||
break;
|
||||
case 'R':
|
||||
Serial.println(F("Radio receive"));
|
||||
radio.setModeReceive();
|
||||
Serial.println("> ");
|
||||
break;
|
||||
case 'r':
|
||||
setting = SET_REF;
|
||||
break;
|
||||
case 't':
|
||||
setting = SET_TONE;
|
||||
break;
|
||||
case 'a':
|
||||
setting = SET_AMPLITUDE;
|
||||
break;
|
||||
case 'm':
|
||||
setting = SET_ADC_HALF;
|
||||
break;
|
||||
case 's':
|
||||
setting = SET_OFFSET;
|
||||
break;
|
||||
case 'o':
|
||||
dds.on();
|
||||
Serial.println("> ");
|
||||
break;
|
||||
case 'O':
|
||||
dds.off();
|
||||
Serial.println("> ");
|
||||
break;
|
||||
default:
|
||||
if(c == '-' || (c >= '0' && c <= '9')) {
|
||||
*freqBufferPtr = c;
|
||||
freqBufferPtr++;
|
||||
}
|
||||
if((c == '\n' || c == '\r') && freqBufferPtr != freqBuffer) {
|
||||
*freqBufferPtr = '\0';
|
||||
freqBufferPtr = freqBuffer;
|
||||
uint16_t freq = atoi(freqBuffer);
|
||||
if(setting == SET_REF) {
|
||||
dds.setReferenceClock(freq);
|
||||
dds.setFrequency(lastFreq);
|
||||
dds.start();
|
||||
Serial.print(F("New Reference Clock: "));
|
||||
Serial.println(dds.getReferenceClock());
|
||||
} else if(setting == SET_TONE) {
|
||||
dds.setFrequency(freq);
|
||||
lastFreq = freq;
|
||||
Serial.print(F("New Tone: "));
|
||||
Serial.println(freq);
|
||||
} else if(setting == SET_AMPLITUDE) {
|
||||
dds.setAmplitude((uint8_t)(freq&0xFF));
|
||||
Serial.print(F("New Amplitude: "));
|
||||
Serial.println((uint8_t)(freq&0xFF));
|
||||
} else if(setting == SET_ADC_HALF) {
|
||||
adcHalf = freq&0xFF;
|
||||
Serial.print(F("ADC midpoint set to "));
|
||||
Serial.println((uint8_t)(freq&0xFF));
|
||||
} else if(setting == SET_OFFSET) {
|
||||
dds.setReferenceOffset((int16_t)atoi(freqBuffer));
|
||||
dds.setFrequency(lastFreq);
|
||||
Serial.print(F("Refclk offset: "));
|
||||
Serial.println(dds.getReferenceOffset());
|
||||
}
|
||||
Serial.println("> ");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ISR(ADC_vect) {
|
||||
static uint16_t pulseLength = 0;
|
||||
static uint8_t lastADC = 127;
|
||||
cli();
|
||||
TIFR1 = _BV(ICF1);
|
||||
//PORTD |= _BV(2);
|
||||
dds.clockTick();
|
||||
sei();
|
||||
if(listening) {
|
||||
pulseLength++;
|
||||
if(ADCH >= adcHalf && lastADC < adcHalf) {
|
||||
// Zero crossing, upward
|
||||
recordedPulseLength = pulseLength;
|
||||
recordedPulse = true;
|
||||
pulseLength = 0;
|
||||
}
|
||||
if(minADC > ADCH) {
|
||||
minADC = ADCH;
|
||||
}
|
||||
if(maxADC < ADCH) {
|
||||
maxADC = ADCH;
|
||||
}
|
||||
lastADC = ADCH;
|
||||
}
|
||||
//PORTD &= ~_BV(2);
|
||||
}
|
||||
67
examples/DDS/DDS.ino
Normal file
67
examples/DDS/DDS.ino
Normal file
@@ -0,0 +1,67 @@
|
||||
/* Hamshield
|
||||
* Example: DDS
|
||||
* This is a simple example to show how to transmit arbitrary
|
||||
* tones. In this case, the sketh alternates between 1200Hz
|
||||
* and 2200Hz at 1s intervals.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Connect the Arduino to wall
|
||||
* power and then to your computer via USB. Upload this program
|
||||
* to your Arduino. To test, set a HandyTalkie to 438MHz. You
|
||||
* should hear two alternating tones.
|
||||
*/
|
||||
|
||||
#define DDS_REFCLK_DEFAULT 9600
|
||||
#include <HamShield.h>
|
||||
#include <DDS.h>
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
HamShield radio;
|
||||
DDS dds;
|
||||
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
// turn on radio
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
radio.initialize();
|
||||
radio.setRfPower(0);
|
||||
radio.frequency(438000);
|
||||
radio.setModeTransmit();
|
||||
dds.start();
|
||||
dds.playWait(600, 3000);
|
||||
dds.on();
|
||||
//dds.setAmplitude(31);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
dds.setFrequency(2200);
|
||||
delay(1000);
|
||||
dds.setFrequency(1200);
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
#ifdef DDS_USE_ONLY_TIMER2
|
||||
ISR(TIMER2_OVF_vect) {
|
||||
dds.clockTick();
|
||||
}
|
||||
#else // Use the ADC timer instead
|
||||
ISR(ADC_vect) {
|
||||
static unsigned char tcnt = 0;
|
||||
TIFR1 = _BV(ICF1); // Clear the timer flag
|
||||
if(++tcnt == 4) {
|
||||
tcnt = 0;
|
||||
}
|
||||
dds.clockTick();
|
||||
}
|
||||
#endif
|
||||
@@ -1,28 +1,49 @@
|
||||
/*
|
||||
Morse Code Beacon
|
||||
/* Hamshield
|
||||
* Example: Morse Code Beacon
|
||||
* Test beacon will transmit and wait 30 seconds.
|
||||
* Beacon will check to see if the channel is clear before it
|
||||
* will transmit.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Connect the Arduino to wall
|
||||
* power and then to your computer via USB. After uploading
|
||||
* this program to your Arduino, open the Serial Monitor to
|
||||
* monitor the status of the beacon. To test, set a HandyTalkie
|
||||
* to 438MHz. You should hear the message " KC7IBT ARDUINO
|
||||
* HAMSHIELD" in morse code.
|
||||
|
||||
Test beacon will transmit and wait 30 seconds.
|
||||
Beacon will check to see if the channel is clear before it will transmit.
|
||||
* NOTE: Radio chip audio AGC too slow in responding to tones,
|
||||
* worked around by playing a 6khz tone between actual dits/dahs.
|
||||
* Should work on adjusting AGC to not require this.
|
||||
*/
|
||||
|
||||
// Include the HamSheild and Wire (I2C) libraries
|
||||
#define DDS_REFCLK_DEFAULT 9600
|
||||
#include <HamShield.h>
|
||||
#include <Wire.h>
|
||||
|
||||
// Create a new instance of our HamSheild class, called 'radio'
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
HamShield radio;
|
||||
|
||||
// Run our start up things here
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
// Set up the serial port at 9600 Baud
|
||||
Serial.begin(9600);
|
||||
|
||||
// Send a quick serial string
|
||||
Serial.println("HamShield FM Beacon Example Sketch");
|
||||
|
||||
// Start the Wire (I2C) library
|
||||
Wire.begin();
|
||||
|
||||
// Query the HamShield for status information
|
||||
Serial.print("Radio status: ");
|
||||
int result = radio.testConnection();
|
||||
@@ -30,16 +51,17 @@ void setup() {
|
||||
|
||||
// Tell the HamShield to start up
|
||||
radio.initialize();
|
||||
radio.setRfPower(0);
|
||||
|
||||
// Configure the HamShield to transmit and recieve on 446.000MHz
|
||||
radio.frequency(446000);
|
||||
radio.frequency(438000);
|
||||
|
||||
Serial.println("Radio Configured.");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// We'll wait up to 30 seconds for a clear channel, requiring that the channel is clear for 2 seconds before we transmit
|
||||
if (radio.waitForChannel(30000,2000,-50)) {
|
||||
if (radio.waitForChannel(30000,2000,-5)) {
|
||||
// If we get here, the channel is clear. Let's print the RSSI to the serial port as well.
|
||||
Serial.print("Signal is clear, RSSI: ");
|
||||
Serial.println(radio.readRSSI());
|
||||
@@ -49,14 +71,14 @@ void loop() {
|
||||
radio.setModeTransmit();
|
||||
|
||||
// Send a message out in morse code
|
||||
radio.morseOut("CALLSIGN LOCATOR ARDUINO HAMSHIELD");
|
||||
radio.morseOut(" KC7IBT ARDUINO HAMSHIELD");
|
||||
|
||||
// We're done sending the message, set the radio back into recieve mode.
|
||||
radio.setModeReceive();
|
||||
Serial.println("Done.");
|
||||
|
||||
// Wait 30 seconds before we send our beacon again.
|
||||
delay(30000);
|
||||
// Wait a second before we send our beacon again.
|
||||
delay(1000);
|
||||
} else {
|
||||
// If we get here, the channel is busy. Let's also print out the RSSI.
|
||||
Serial.print("The channel was busy. Waiting 10 seconds. RSSI: ");
|
||||
|
||||
@@ -1,283 +0,0 @@
|
||||
|
||||
// BlueHAM Proto01 Connection Guide
|
||||
/**********************
|
||||
**
|
||||
** BlueHAM Proto01 <--> Arduino
|
||||
** ADC_SCL A5
|
||||
** ADC_DIO A4
|
||||
** GND GND
|
||||
** PWM_RF_CTL D9
|
||||
**
|
||||
** Setting Connections
|
||||
** MODE -> GND
|
||||
** SENB -> GND
|
||||
** PDN -> 3.3V
|
||||
** AVDD -> 5V (note this should be a beefy supply, could draw up to 4As)
|
||||
**
|
||||
**
|
||||
**
|
||||
** Pinout information for RadioPeripheral01 Prototype board
|
||||
** GPIO0 -
|
||||
** GPIO1 -
|
||||
** GPIO2 - VHF_SEL
|
||||
** GPIO3 - UHF_SEL
|
||||
** GPIO4 - RX_EN
|
||||
** GPIO5 - TX_EN
|
||||
** GPIO6 -
|
||||
** GPIO7 -
|
||||
**************************/
|
||||
|
||||
// Arduino Wire library is required if I2Cdev I2CDEV_ARDUINO_WIRE implementation
|
||||
// is used in I2Cdev.h
|
||||
#include "Wire.h"
|
||||
#include "HAMShield.h"
|
||||
|
||||
#include <Goertzel.h>
|
||||
|
||||
//typedef enum {
|
||||
#define MAIN_S 0
|
||||
#define RX_S 1
|
||||
#define TX_S 2
|
||||
#define FREQ_S 3
|
||||
#define UHF_S 4
|
||||
#define VHF_S 5
|
||||
#define PWR_S 6
|
||||
#define GPIO_S 7
|
||||
//} menu_view;
|
||||
|
||||
int state;
|
||||
|
||||
/* goertzel routines */
|
||||
|
||||
int sensorPin = A0;
|
||||
int led = 13;
|
||||
const float TARGET_FREQUENCY = 2200;
|
||||
const int N = 100;
|
||||
const float THRESHOLD = 4000;
|
||||
const float SAMPLING_FREQUENCY = 8900;
|
||||
Goertzel goertzel = Goertzel(TARGET_FREQUENCY, N, SAMPLING_FREQUENCY);
|
||||
|
||||
// create object for RDA
|
||||
HAMShield radio;
|
||||
|
||||
|
||||
#define LED_PIN 13
|
||||
bool blinkState = false;
|
||||
|
||||
void setup() {
|
||||
// initialize serial communication
|
||||
Serial.begin(115200);
|
||||
Serial.println("beginning radio setup");
|
||||
|
||||
// join I2C bus (I2Cdev library doesn't do this automatically)
|
||||
Wire.begin();
|
||||
|
||||
// verify connection
|
||||
Serial.println("Testing device connections...");
|
||||
Serial.println(radio.testConnection() ? "RDA radio connection successful" : "RDA radio connection failed");
|
||||
|
||||
// initialize device
|
||||
Serial.println("Initializing I2C devices...");
|
||||
radio.initialize(); // initializes automatically for UHF 12.5kHz channel
|
||||
|
||||
Serial.println("setting default Radio configuration");
|
||||
|
||||
|
||||
// set frequency
|
||||
Serial.println("changing frequency");
|
||||
|
||||
|
||||
radio.setFrequency(446000); // in kHz
|
||||
radio.setModeReceive();
|
||||
|
||||
// configure Arduino LED for
|
||||
pinMode(LED_PIN, OUTPUT);
|
||||
|
||||
state = MAIN_S;
|
||||
print_menu();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
goertzel.sample(sensorPin);
|
||||
float magnitude = goertzel.detect();
|
||||
if(magnitude>THRESHOLD) digitalWrite(led, HIGH); //if found, enable led
|
||||
else digitalWrite(led, LOW);
|
||||
while (Serial.available()) {
|
||||
if (state == FREQ_S) {
|
||||
char freq_khz[6];
|
||||
int i = 0;
|
||||
while(i < 6) {
|
||||
if (Serial.available()) {
|
||||
freq_khz[i] = Serial.read();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
// interpret frequency
|
||||
uint32_t freq = 0;
|
||||
i = 0;
|
||||
while (i < 6) {
|
||||
uint32_t temp = freq_khz[i] - '0';
|
||||
for (int k = 5-i; k > 0; k--) {
|
||||
temp = temp * 10;
|
||||
}
|
||||
freq += temp;
|
||||
i++;
|
||||
}
|
||||
Serial.print("setting frequency to: ");
|
||||
Serial.println(freq);
|
||||
radio.setFrequency(freq);
|
||||
state = MAIN_S;
|
||||
|
||||
} else if (state == PWR_S) {
|
||||
uint8_t pwr_raw[3];
|
||||
int i = 0;
|
||||
while(i < 3) {
|
||||
if (Serial.available()) {
|
||||
pwr_raw[i] = Serial.read();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
// interpret power
|
||||
uint8_t pwr = 0;
|
||||
i = 0;
|
||||
while (i < 3) {
|
||||
uint8_t temp = pwr_raw[i] - '0';
|
||||
for (int k = 2-i; k > 0; k--) {
|
||||
temp = temp * 10;
|
||||
}
|
||||
pwr += temp;
|
||||
i++;
|
||||
}
|
||||
|
||||
Serial.print("Setting power to: ");
|
||||
Serial.println(pwr);
|
||||
radio.setRfPower(pwr);
|
||||
state = MAIN_S;
|
||||
|
||||
} else if (state == GPIO_S) {
|
||||
uint8_t gpio_raw[2];
|
||||
int i = 0;
|
||||
while(i < 2) {
|
||||
if (Serial.available()) {
|
||||
gpio_raw[i] = Serial.read();
|
||||
i++;
|
||||
}
|
||||
}
|
||||
uint16_t gpio_pin = gpio_raw[0] - 48; // '0';
|
||||
uint16_t gpio_mode = gpio_raw[1] - 48;
|
||||
|
||||
radio.setGpioMode(gpio_pin, gpio_mode);
|
||||
state = MAIN_S;
|
||||
|
||||
} else {
|
||||
char action = Serial.read();
|
||||
if (action == 'r') { // get current state
|
||||
state = RX_S;
|
||||
} else if (action == 't') {
|
||||
state = TX_S;
|
||||
} else if (action == 'f') {
|
||||
state = FREQ_S;
|
||||
} else if (action == 'u') {
|
||||
state = UHF_S;
|
||||
} else if (action == 'v') {
|
||||
state = VHF_S;
|
||||
} else if (action == '1') {
|
||||
turn_on(state);
|
||||
state = MAIN_S;
|
||||
} else if (action == '0') {
|
||||
turn_off(state);
|
||||
state = MAIN_S;
|
||||
} else if (action == 'p') {
|
||||
state = PWR_S;
|
||||
} else if (action == 'g') {
|
||||
state = GPIO_S;
|
||||
} else if (action == 's') {
|
||||
int16_t rssi = radio.readRSSI();
|
||||
Serial.print("rssi: ");
|
||||
Serial.println(rssi);
|
||||
} else if (action == 'i') {
|
||||
int16_t vssi = radio.readVSSI();
|
||||
Serial.print("vssi: ");
|
||||
Serial.println(vssi);
|
||||
}
|
||||
|
||||
Serial.println(action);
|
||||
}
|
||||
Serial.flush();
|
||||
print_menu();
|
||||
}
|
||||
}
|
||||
|
||||
void turn_off(int dev) {
|
||||
switch (dev) {
|
||||
case RX_S:
|
||||
radio.setRX(0);
|
||||
break;
|
||||
case TX_S:
|
||||
radio.setTX(0);
|
||||
break;
|
||||
case UHF_S:
|
||||
radio.setGpioMode(3, 3); // set GPIO3 high (uhf is active low)
|
||||
break;
|
||||
case VHF_S:
|
||||
radio.setGpioMode(2, 3); // set GPIO2 high (vhf is active low)
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void turn_on(int dev) {
|
||||
switch (dev) {
|
||||
case RX_S:
|
||||
radio.setRX(1);
|
||||
break;
|
||||
case TX_S:
|
||||
radio.setTX(1);
|
||||
break;
|
||||
case UHF_S:
|
||||
radio.setGpioMode(3, 2); // set GPIO3 low (uhf is active low)
|
||||
break;
|
||||
case VHF_S:
|
||||
radio.setGpioMode(2, 2); // set GPIO2 low (uhf is active low)
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void print_menu() {
|
||||
Serial.println("MENU");
|
||||
switch (state) {
|
||||
case MAIN_S:
|
||||
Serial.println("select step: [r]x, [t]x, [f]req, [u]hf, [v]hf, [p]wr, [g]pio control, r[s]si, vss[i] ...");
|
||||
break;
|
||||
case RX_S:
|
||||
Serial.println("enter 1 to turn on rx, 0 to turn off rx");
|
||||
break;
|
||||
case TX_S:
|
||||
Serial.println("enter 1 to turn on tx, 0 to turn off tx");
|
||||
break;
|
||||
case FREQ_S:
|
||||
Serial.println("enter frequency in kHz (ffffff)");
|
||||
break;
|
||||
case UHF_S:
|
||||
Serial.println("enter 1 to turn on uhf, 0 to turn off uhf");
|
||||
break;
|
||||
case VHF_S:
|
||||
Serial.println("enter 1 to turn on vhf, 0 to turn off vhf");
|
||||
break;
|
||||
case PWR_S:
|
||||
Serial.println("enter power (raw) (ppp)");
|
||||
break;
|
||||
case GPIO_S:
|
||||
Serial.println("enter GPIO pin and control (no spaces, eg pin 1 mode 3 is 13");
|
||||
Serial.println("modes 0 - HiZ, 1 - FCN, 2 - Low, 3 - Hi");
|
||||
break;
|
||||
default:
|
||||
state = MAIN_S;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +1,59 @@
|
||||
/* Fox Hunt */
|
||||
/* Hamshield
|
||||
* Example: Fox Hunt
|
||||
* Plays a one minute tone at 10-13 minute intervals. Script
|
||||
* will check to see if the channel is clear before it will
|
||||
* transmit.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Connect the Arduino to wall
|
||||
* power and then to your computer via USB. To test, set a
|
||||
* HandyTalkie to 438MHz. You should hear a one-minute tone
|
||||
* followed by a callsign every 10-13 minutes.
|
||||
*/
|
||||
|
||||
#include <HAMShield.h>
|
||||
#include <Wire.h>
|
||||
#include <HamShield.h>
|
||||
|
||||
// transmit for 1 minute, every 10 minutes
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
#define TRANSMITLENGTH 1
|
||||
// In milliseconds
|
||||
#define TRANSMITLENGTH 60000
|
||||
// In minutes
|
||||
#define INTERVAL 10
|
||||
#define RANDOMCHANCE 3
|
||||
|
||||
HAMShield radio;
|
||||
HamShield radio;
|
||||
|
||||
void setup() {
|
||||
Wire.begin();
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
radio.initialize();
|
||||
radio.setFrequency(145510);
|
||||
radio.setRfPower(0);
|
||||
radio.frequency(438000);
|
||||
radio.setModeReceive();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
waitMinute(INTERVAL + random(0,RANDOMCHANCE)); // wait before transmitting, randomly up to 3 minutes later
|
||||
if(radio.waitForChannel(30000,2000)) { // wait for a clear channel, abort after 30 seconds, wait 2 seconds of dead air for breakers
|
||||
if(radio.waitForChannel(30000,2000, -90)) { // wait for a clear channel, abort after 30 seconds, wait 2 seconds of dead air for breakers
|
||||
radio.setModeTransmit(); // turn on transmit mode
|
||||
tone(1000,11,TRANSMITLENGTH * 60 * 1000); // play a long solid tone
|
||||
tone(PWM_PIN, 1000, TRANSMITLENGTH); // play a long solid tone
|
||||
delay(TRANSMITLENGTH);
|
||||
radio.morseOut(" 1ZZ9ZZ/B FOXHUNT"); // identify the fox hunt transmitter
|
||||
radio.setModeReceive(); // turn off the transmit mode
|
||||
}
|
||||
waitMinute(INTERVAL + random(0,RANDOMCHANCE)); // wait before transmitting, randomly
|
||||
}
|
||||
|
||||
// a function so we can wait by minutes
|
||||
|
||||
void waitMinute(int period) {
|
||||
void waitMinute(unsigned long period) {
|
||||
delay(period * 60 * 1000);
|
||||
}
|
||||
|
||||
|
||||
|
||||
81
examples/FunctionalTest/FunctionalTest.ino
Normal file
81
examples/FunctionalTest/FunctionalTest.ino
Normal file
@@ -0,0 +1,81 @@
|
||||
/* Hamshield
|
||||
* Example: Functional Test
|
||||
* This is a simple example to demonstrate HamShield receive
|
||||
* and transmit functionality.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Plug a pair of headphones into
|
||||
* the HamShield. Connect the Arduino to wall power and then
|
||||
* to your computer via USB. After uploading this program to
|
||||
* your Arduino, open the Serial Monitor. Serial Monitor will
|
||||
* describe what you should be expecting to hear from your
|
||||
* headphones. Tune a HandytTalkie to 446MHz to hear morse
|
||||
* code example.
|
||||
*/
|
||||
|
||||
#include <HamShield.h>
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
HamShield radio;
|
||||
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
Serial.begin(9600);
|
||||
Serial.println("If the sketch freezes at radio status, there is something wrong with power or the shield");
|
||||
Serial.print("Radio status: ");
|
||||
int result = radio.testConnection();
|
||||
Serial.println(result,DEC);
|
||||
Serial.println("Setting radio to its defaults..");
|
||||
radio.initialize();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
radio.setModeReceive();
|
||||
radio.setSQLoThresh(0);
|
||||
radio.setSQOff();
|
||||
radio.setVolume1(0xF);
|
||||
radio.setVolume2(0xF);
|
||||
delay(1000);
|
||||
Serial.println("Changing frequency to 446.000 and waiting 10 seconds. You should hear static fading in.");
|
||||
radio.frequency(446000);
|
||||
for(int x = 0; x < 16; x++) { radio.setVolume1(x); delay(500); Serial.print(x); Serial.print(".."); }
|
||||
for(int x = 0; x < 16; x++) { radio.setVolume2(x); delay(500); Serial.print(x); Serial.print(".."); }
|
||||
radio.setVolume1(0xF);
|
||||
radio.setVolume2(0xF);
|
||||
|
||||
delay(10000);
|
||||
Serial.println("Changing frequency to 450.000 and waiting 10 seconds. You should hear static.");
|
||||
radio.frequency(446000);
|
||||
delay(10000);
|
||||
Serial.println("Changing frequency to 220.000 and waiting 10 seconds. you should hear static.");
|
||||
radio.frequency(220000);
|
||||
delay(10000);
|
||||
Serial.println("Changing frequency to 144.520 and waiting 10 seconds. you should hear static.");
|
||||
radio.frequency(144520);
|
||||
delay(10000);
|
||||
Serial.println("Now lets scan for a weather radio station and listen for a while....");
|
||||
radio.setWXChannel(radio.scanWXChannel());
|
||||
Serial.println("If you hear weather radio, it means the scanWXChannel() and setWXChannel() and VHF works.");
|
||||
Serial.println("We will sit here for 30 seconds because weather is important.");
|
||||
delay(30000);
|
||||
Serial.println("We will now tune to 446.000 and send morse code");
|
||||
radio.frequency(446000);
|
||||
radio.setModeTransmit();
|
||||
radio.morseOut("HELLO PERSON");
|
||||
radio.setModeReceive();
|
||||
Serial.println("Now we are receiving on the call frequency. Starting over again.");
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,49 @@
|
||||
/*
|
||||
|
||||
Gauges
|
||||
|
||||
Simple gauges for the radio receiver.
|
||||
|
||||
|
||||
/* Hamshield
|
||||
* Example: Gauges
|
||||
* This example prints Signal, Audio In, and Audio Rx ADC
|
||||
* Peak strength to the Serial Monitor in a graphical manner.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Plug a pair of headphones into
|
||||
* the HamShield. Connect the Arduino to wall power and then
|
||||
* to your computer via USB. After uploading this program to
|
||||
* your Arduino, open the Serial Monitor. You will see a
|
||||
* repeating display of different signal strengths. Ex:
|
||||
*
|
||||
* [....|....] -73
|
||||
* Signal
|
||||
*
|
||||
* Uncheck the "Autoscroll" box at the bottom of the Serial
|
||||
* Monitor to manually control the view of the Serial Monitor.
|
||||
*/
|
||||
|
||||
#include <HAMShield.h>
|
||||
#include <Wire.h>
|
||||
#include <HamShield.h>
|
||||
|
||||
HAMShield radio;
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
void clr() {
|
||||
/* Serial.write(27);
|
||||
Serial.print("[2J"); // cursor to home command */
|
||||
Serial.write(27);
|
||||
Serial.print("[H"); // cursor to home command
|
||||
}
|
||||
HamShield radio;
|
||||
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
analogReference(DEFAULT);
|
||||
Serial.begin(115200);
|
||||
Wire.begin();
|
||||
Serial.begin(9600);
|
||||
|
||||
Serial.print("Radio status: ");
|
||||
int result = radio.testConnection();
|
||||
Serial.println(result,DEC);
|
||||
radio.initialize();
|
||||
radio.setFrequency(446000);
|
||||
radio.frequency(446000);
|
||||
radio.setModeReceive();
|
||||
Serial.println("Entering gauges...");
|
||||
tone(9,1000);
|
||||
@@ -45,7 +61,6 @@ int txc = 0;
|
||||
int mode = 0;
|
||||
|
||||
void loop() {
|
||||
clr();
|
||||
int16_t rssi = radio.readRSSI();
|
||||
gauge = map(rssi,-123,-50,0,8);
|
||||
Serial.print("[");
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
/* Simple DTMF controlled HAM Radio Robot */
|
||||
|
||||
#include <ArduinoRobot.h> // include the robot library
|
||||
#include <HAMShield.h>
|
||||
#include <Wire.h>
|
||||
#include <SPI.h>
|
||||
|
||||
HAMShield radio;
|
||||
|
||||
void setup() {
|
||||
Robot.begin();
|
||||
Wire.begin();
|
||||
radio.initialize();
|
||||
radio.setFrequency(145510);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
if(radio.waitForDTMF()) { // wait for a received DTMF tone
|
||||
uint8_t command = radio.getLastDTMFDigit(); // get the last DTMF tone sent
|
||||
if(command == '4') { Robot.turn(-90); } // turn robot left
|
||||
if(command == '6') { Robot.turn(90); } // turn robot right
|
||||
if(command == '2') { Robot.motorsWrite(-255,-255); delay(500); Robot.motorsWrite(255, 255); } // move robot forward
|
||||
if(command == '5') { // tell robot to send morse code identity
|
||||
if(radio.waitForChannel()) { // wait for the user to release the transmit button
|
||||
radio.setModeTransmit(); // turn on transmit mode
|
||||
radio.morseOut("1ZZ9ZZ I AM HAMRADIO ROBOT"); // send morse code
|
||||
radio.setModeReceive(); // go back to receive mode on radio
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
148
examples/HandyTalkie/HandyTalkie.ino
Normal file
148
examples/HandyTalkie/HandyTalkie.ino
Normal file
@@ -0,0 +1,148 @@
|
||||
/* Hamshield
|
||||
* Example: HandyTalkie
|
||||
* This is a simple example to demonstrate HamShield receive
|
||||
* and transmit functionality.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Plug a pair of headphones into
|
||||
* the HamShield. Connect the Arduino to wall power and then
|
||||
* to your computer via USB. After uploading this program to
|
||||
* your Arduino, open the Serial Monitor. Press the button on
|
||||
* the HamShield to begin setup. After setup is complete, type
|
||||
* your desired Tx/Rx frequency, in hertz, into the bar at the
|
||||
* top of the Serial Monitor and click the "Send" button.
|
||||
* To test with another HandyTalkie (HT), key up on your HT
|
||||
* and make sure you can hear it through the headphones
|
||||
* attached to the HamShield. Key up on the HamShield by
|
||||
* holding the button.
|
||||
*/
|
||||
|
||||
#include <HamShield.h>
|
||||
|
||||
// create object for radio
|
||||
HamShield radio;
|
||||
|
||||
#define LED_PIN 13
|
||||
#define RSSI_REPORT_RATE_MS 5000
|
||||
|
||||
//TODO: move these into library
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
bool blinkState = false;
|
||||
bool currently_tx;
|
||||
|
||||
uint32_t freq;
|
||||
|
||||
unsigned long rssi_timeout;
|
||||
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
digitalWrite(RESET_PIN, LOW);
|
||||
|
||||
|
||||
// initialize serial communication
|
||||
Serial.begin(9600);
|
||||
Serial.println("press the switch to begin...");
|
||||
|
||||
while (digitalRead(SWITCH_PIN));
|
||||
|
||||
// let the AU ot of reset
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
Serial.println("beginning radio setup");
|
||||
|
||||
// verify connection
|
||||
Serial.println("Testing device connections...");
|
||||
Serial.println(radio.testConnection() ? "RDA radio connection successful" : "RDA radio connection failed");
|
||||
|
||||
// initialize device
|
||||
Serial.println("Initializing I2C devices...");
|
||||
radio.initialize(); // initializes automatically for UHF 12.5kHz channel
|
||||
|
||||
Serial.println("setting default Radio configuration");
|
||||
radio.dangerMode();
|
||||
|
||||
// set frequency
|
||||
Serial.println("changing frequency");
|
||||
|
||||
radio.setSQOff();
|
||||
freq = 446000;
|
||||
radio.frequency(freq);
|
||||
|
||||
// set to receive
|
||||
|
||||
radio.setModeReceive();
|
||||
currently_tx = false;
|
||||
Serial.print("config register is: ");
|
||||
Serial.println(radio.readCtlReg());
|
||||
Serial.println(radio.readRSSI());
|
||||
|
||||
/*
|
||||
// set to transmit
|
||||
radio.setModeTransmit();
|
||||
// maybe set PA bias voltage
|
||||
Serial.println("configured for transmit");
|
||||
radio.setTxSourceMic();
|
||||
|
||||
|
||||
*/
|
||||
radio.setRfPower(0);
|
||||
|
||||
// configure Arduino LED for
|
||||
pinMode(LED_PIN, OUTPUT);
|
||||
rssi_timeout = 0;
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
if (!digitalRead(SWITCH_PIN))
|
||||
{
|
||||
if (!currently_tx)
|
||||
{
|
||||
currently_tx = true;
|
||||
|
||||
// set to transmit
|
||||
radio.setModeTransmit();
|
||||
Serial.println("Tx");
|
||||
//radio.setTxSourceMic();
|
||||
//radio.setRfPower(1);
|
||||
}
|
||||
} else if (currently_tx) {
|
||||
radio.setModeReceive();
|
||||
currently_tx = false;
|
||||
Serial.println("Rx");
|
||||
}
|
||||
|
||||
|
||||
if (Serial.available()) {
|
||||
if (Serial.peek() == 'r') {
|
||||
Serial.read();
|
||||
digitalWrite(RESET_PIN, LOW);
|
||||
delay(1000);
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
radio.initialize(); // initializes automatically for UHF 12.5kHz channel
|
||||
} else {
|
||||
Serial.setTimeout(40);
|
||||
freq = Serial.parseInt();
|
||||
Serial.flush();
|
||||
radio.frequency(freq);
|
||||
Serial.print("set frequency: ");
|
||||
Serial.println(freq);
|
||||
}
|
||||
}
|
||||
|
||||
if (!currently_tx && (millis() - rssi_timeout) > RSSI_REPORT_RATE_MS)
|
||||
{
|
||||
Serial.println(radio.readRSSI());
|
||||
rssi_timeout = millis();
|
||||
}
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
|
||||
Indentifier
|
||||
|
||||
Arduino audio overlay example
|
||||
|
||||
*/
|
||||
|
||||
#include <HAMShield.h>
|
||||
#include <Wire.h>
|
||||
|
||||
#define DOT 100
|
||||
|
||||
HAMShield radio;
|
||||
|
||||
const char *bascii = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,?'!/()&:;=+-_\"$@",
|
||||
*bitu[] = { ".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-","...-",".--","-..-","-.--","--..","-----",".----","..---","...--","....-",".....","-....","--...","---..","----.",".-.-.-","--..--","..--..",".----.","-.-.--","-..-.","-.--.","-.--.-",".-...","---...","-.-.-.","-...-",".-.-.","-....-","..--.-",".-..-.","...-..-",".--.-."
|
||||
};
|
||||
|
||||
const char *callsign = {"1ZZ9ZZ/B"} ;
|
||||
|
||||
char morsebuffer[8];
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600);
|
||||
Serial.println("starting up..");
|
||||
Wire.begin();
|
||||
Serial.print("Radio status: ");
|
||||
int result = radio.testConnection();
|
||||
Serial.println(result,DEC);
|
||||
radio.initialize();
|
||||
radio.setFrequency(446000);
|
||||
radio.setVolume1(0xF);
|
||||
radio.setVolume2(0xF);
|
||||
radio.setModeReceive();
|
||||
radio.setTxSourceMic();
|
||||
radio.setSQLoThresh(80);
|
||||
radio.setSQOn();
|
||||
Serial.println("Done with radio beacon setup. Press and hold a key to transmit.");
|
||||
}
|
||||
|
||||
int state = 0;
|
||||
long timer = 0;
|
||||
int morseletter = 0;
|
||||
int morsesymbol = 0;
|
||||
long keyer = 0;
|
||||
char symbol;
|
||||
|
||||
void loop() {
|
||||
if(Serial.available() > 0) {
|
||||
if(state == 0) {
|
||||
state = 10;
|
||||
radio.setModeTransmit();
|
||||
timer = millis();
|
||||
keyer = millis();
|
||||
}
|
||||
if(state == 10) {
|
||||
timer = millis();
|
||||
}
|
||||
}
|
||||
if(millis() > (timer + 500)) { radio.setModeReceive(); morseletter = 0; morsesymbol = 0; state = 0; }
|
||||
if(state == 10) {
|
||||
if(millis() > (keyer + (DOT * 3))) {
|
||||
keyer = millis();
|
||||
symbol = lookup(callsign[morseletter],morsesymbol);
|
||||
if(symbol == '-') { tone(9,1000,DOT*3); }
|
||||
if(symbol == '.') { tone(9,1000,DOT); }
|
||||
if(symbol == 0) { morsesymbol = 0; morseletter++; }
|
||||
if(callsign[morseletter] == 0) { morsesymbol = 0; morseletter = 0; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
char lookup(char letter, int morsesymbol) {
|
||||
for(int x = 0; x < 54; x++) {
|
||||
if(letter == bascii[x]) {
|
||||
return bitu[x][morsesymbol];
|
||||
}
|
||||
}
|
||||
}
|
||||
51
examples/JustTransmit/JustTransmit.ino
Normal file
51
examples/JustTransmit/JustTransmit.ino
Normal file
@@ -0,0 +1,51 @@
|
||||
/* Hamshield
|
||||
* Example: Just Transmit
|
||||
* This example continuously transmits.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Plug a pair of headphones with
|
||||
* built-in mic into the HamShield. Connect the Arduino to
|
||||
* wall power and then to your computer via USB. After
|
||||
* uploading this program to your Arduino, open the Serial
|
||||
* Monitor to monitor the program's progress. After setup is
|
||||
* complete, tune a HandyTalkie (HT) to 144.025MHz. Listen on
|
||||
* the HT for the HamShield broadcasting from the mic.
|
||||
*/
|
||||
|
||||
#include <HamShield.h>
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
HamShield radio;
|
||||
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
Serial.begin(9600);
|
||||
Serial.println("If the sketch freezes at radio status, there is something wrong with power or the shield");
|
||||
Serial.print("Radio status: ");
|
||||
int result = radio.testConnection();
|
||||
Serial.println(result,DEC);
|
||||
Serial.println("Setting radio to its defaults..");
|
||||
radio.initialize();
|
||||
radio.setRfPower(0);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
radio.bypassPreDeEmph();
|
||||
radio.frequency(144025);
|
||||
// radio.setTxSourceNone();
|
||||
radio.setModeTransmit();
|
||||
for(;;) { }
|
||||
}
|
||||
|
||||
58
examples/KISS/KISS.ino
Normal file
58
examples/KISS/KISS.ino
Normal file
@@ -0,0 +1,58 @@
|
||||
/* Hamshield
|
||||
* Example: KISS
|
||||
* This is a example configures the HamShield to be used as
|
||||
* a TNC/KISS device. You will need a KISS device to input
|
||||
* commands to the HamShield
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Connect the Arduino to wall
|
||||
* power and then to your computer via USB. Issue commands
|
||||
* via the KISS equipment.
|
||||
*/
|
||||
|
||||
#include <HamShield.h>
|
||||
#include <KISS.h>
|
||||
#include <packet.h>
|
||||
|
||||
HamShield radio;
|
||||
DDS dds;
|
||||
KISS kiss(&Serial, &radio, &dds);
|
||||
AFSK afsk;
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
digitalWrite(RESET_PIN, LOW);
|
||||
|
||||
Serial.begin(9600);
|
||||
|
||||
while (digitalRead(SWITCH_PIN));
|
||||
|
||||
// let the AU ot of reset
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
radio.initialize();
|
||||
radio.setSQOff();
|
||||
radio.frequency(144390);
|
||||
|
||||
dds.start();
|
||||
afsk.start(&dds);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
kiss.loop();
|
||||
}
|
||||
|
||||
ISR(ADC_vect) {
|
||||
kiss.isr();
|
||||
}
|
||||
118
examples/PSK31Transmit/PSK31Transmit.ino
Normal file
118
examples/PSK31Transmit/PSK31Transmit.ino
Normal file
@@ -0,0 +1,118 @@
|
||||
/* Hamshield
|
||||
* Example: PSK31Transmit
|
||||
* This is a simple example to demonstrate HamShield PSK31
|
||||
* transmit functionality.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Connect the Arduino to wall
|
||||
* power and then to your computer via USB. After uploading
|
||||
* this program to your Arduino, tune a PSK31 receiver and
|
||||
* wait to receive the message "Why hello there, friend.
|
||||
* Nice to meet you. Welcome to PSK31. 73, VE6SLP sk"
|
||||
*/
|
||||
|
||||
#include <HamShield.h>
|
||||
#include <DDS.h>
|
||||
#include "varicode.h"
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
DDS dds;
|
||||
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
Serial.begin(9600);
|
||||
// put your setup code here, to run once:
|
||||
dds.setReferenceClock(32000);
|
||||
dds.start();
|
||||
dds.setFrequency(1000);
|
||||
dds.on();
|
||||
}
|
||||
|
||||
volatile bool sent = true;
|
||||
volatile uint16_t bitsToSend = 0;
|
||||
volatile uint8_t zeroCount = 0;
|
||||
|
||||
void sendChar(uint8_t c) {
|
||||
uint16_t bits = varicode[c];
|
||||
while((bits&0x8000)==0) {
|
||||
bits<<=1;
|
||||
}
|
||||
while(!sent) {} //delay(32);
|
||||
cli();
|
||||
sent = false;
|
||||
bitsToSend = bits;
|
||||
sei();
|
||||
while(!sent) {} //delay(32);
|
||||
//PORTD &= ~_BV(2); // Diagnostic pin (D2)
|
||||
}
|
||||
|
||||
char *string = "Why hello there, friend. Nice to meet you. Welcome to PSK31. 73, VE6SLP sk\r\n";
|
||||
void loop() {
|
||||
int i;
|
||||
// put your main code here, to run repeatedly:
|
||||
//for(i = 0; i<5; i++)
|
||||
// sendChar(0);
|
||||
// return;
|
||||
for(i = 0; i < strlen(string); i++) {
|
||||
sendChar(string[i]);
|
||||
//Serial.println(string[i]);
|
||||
}
|
||||
}
|
||||
|
||||
const uint8_t amplitudeShape[41] = {
|
||||
255, 241, 228, 215, 203, 191, 181, 171, 161, 152, 143, 135, 128, 121, 114, 107, 101, 96, 90, 85, 80, 76, 72, 68, 64, 60, 57, 54, 51, 48, 45, 42, 40, 38, 36, 34, 32, 30, 28, 27, 25
|
||||
};
|
||||
|
||||
// This will trigger at 8kHz
|
||||
ISR(ADC_vect) {
|
||||
static uint8_t outer = 0;
|
||||
static uint8_t tcnt = 0;
|
||||
TIFR1 |= _BV(ICF1);
|
||||
// Wave shaping
|
||||
// TODO: Improve how this would perform.
|
||||
//else if(tcnt > (255-64))
|
||||
// dds.setAmplitude((255 - tcnt));
|
||||
//else dds.setAmplitude(255);
|
||||
if(tcnt < 81)
|
||||
dds.setAmplitude(amplitudeShape[(81-tcnt)/2]);
|
||||
if(tcnt > (255-81))
|
||||
dds.setAmplitude(amplitudeShape[(tcnt-174)/2]);
|
||||
dds.clockTick();
|
||||
//PORTD &= ~_BV(2);
|
||||
if(outer++ == 3) {
|
||||
outer = 0;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if(tcnt++ == 0) { // Next bit
|
||||
//PORTD ^= _BV(2); // Diagnostic pin (D2)
|
||||
if(!sent) {
|
||||
if((bitsToSend & 0x8000) == 0) {
|
||||
zeroCount++;
|
||||
dds.changePhaseDeg(+180);
|
||||
} else {
|
||||
zeroCount = 0;
|
||||
}
|
||||
bitsToSend<<=1;
|
||||
if(zeroCount == 2) {
|
||||
sent = true;
|
||||
}
|
||||
} else {
|
||||
// Idle on zeroes
|
||||
dds.changePhaseDeg(+180);
|
||||
}
|
||||
}
|
||||
//PORTD &= ~_BV(2);
|
||||
}
|
||||
130
examples/PSK31Transmit/varicode.h
Normal file
130
examples/PSK31Transmit/varicode.h
Normal file
@@ -0,0 +1,130 @@
|
||||
const uint16_t varicode[] = {
|
||||
0xAAC0, // ASCII = 0 1010101011
|
||||
0xB6C0, // ASCII = 1 1011011011
|
||||
0xBB40, // ASCII = 2 1011101101
|
||||
0xDDC0, // ASCII = 3 1101110111
|
||||
0xBAC0, // ASCII = 4 1011101011
|
||||
0xD7C0, // ASCII = 5 1101011111
|
||||
0xBBC0, // ASCII = 6 1011101111
|
||||
0xBF40, // ASCII = 7 1011111101
|
||||
0xBFC0, // ASCII = 8 1011111111
|
||||
0xEF00, // ASCII = 9 11101111
|
||||
0xE800, // ASCII = 10 11101
|
||||
0xDBC0, // ASCII = 11 1101101111
|
||||
0xB740, // ASCII = 12 1011011101
|
||||
0xF800, // ASCII = 13 11111
|
||||
0xDD40, // ASCII = 14 1101110101
|
||||
0xEAC0, // ASCII = 15 1110101011
|
||||
0xBDC0, // ASCII = 16 1011110111
|
||||
0xBD40, // ASCII = 17 1011110101
|
||||
0xEB40, // ASCII = 18 1110101101
|
||||
0xEBC0, // ASCII = 19 1110101111
|
||||
0xD6C0, // ASCII = 20 1101011011
|
||||
0xDAC0, // ASCII = 21 1101101011
|
||||
0xDB40, // ASCII = 22 1101101101
|
||||
0xD5C0, // ASCII = 23 1101010111
|
||||
0xDEC0, // ASCII = 24 1101111011
|
||||
0xDF40, // ASCII = 25 1101111101
|
||||
0xEDC0, // ASCII = 26 1110110111
|
||||
0xD540, // ASCII = 27 1101010101
|
||||
0xD740, // ASCII = 28 1101011101
|
||||
0xEEC0, // ASCII = 29 1110111011
|
||||
0xBEC0, // ASCII = 30 1011111011
|
||||
0xDFC0, // ASCII = 31 1101111111
|
||||
0x8000, // ASCII = ' ' 1
|
||||
0xFF80, // ASCII = '!' 111111111
|
||||
0xAF80, // ASCII = '"' 101011111
|
||||
0xFA80, // ASCII = '#' 111110101
|
||||
0xED80, // ASCII = '$' 111011011
|
||||
0xB540, // ASCII = '%' 1011010101
|
||||
0xAEC0, // ASCII = '&' 1010111011
|
||||
0xBF80, // ASCII = ''' 101111111
|
||||
0xFB00, // ASCII = '(' 11111011
|
||||
0xF700, // ASCII = ')' 11110111
|
||||
0xB780, // ASCII = '*' 101101111
|
||||
0xEF80, // ASCII = '+' 111011111
|
||||
0xEA00, // ASCII = ',' 1110101
|
||||
0xD400, // ASCII = '-' 110101
|
||||
0xAE00, // ASCII = '.' 1010111
|
||||
0xD780, // ASCII = '/' 110101111
|
||||
0xB700, // ASCII = '0' 10110111
|
||||
0xBD00, // ASCII = '1' 10111101
|
||||
0xED00, // ASCII = '2' 11101101
|
||||
0xFF00, // ASCII = '3' 11111111
|
||||
0xBB80, // ASCII = '4' 101110111
|
||||
0xAD80, // ASCII = '5' 101011011
|
||||
0xB580, // ASCII = '6' 101101011
|
||||
0xD680, // ASCII = '7' 110101101
|
||||
0xD580, // ASCII = '8' 110101011
|
||||
0xDB80, // ASCII = '9' 110110111
|
||||
0xF500, // ASCII = ':' 11110101
|
||||
0xDE80, // ASCII = ';' 110111101
|
||||
0xF680, // ASCII = '<' 111101101
|
||||
0xAA00, // ASCII = '=' 1010101
|
||||
0xEB80, // ASCII = '>' 111010111
|
||||
0xABC0, // ASCII = '?' 1010101111
|
||||
0xAF40, // ASCII = '@' 1010111101
|
||||
0xFA00, // ASCII = 'A' 1111101
|
||||
0xEB00, // ASCII = 'B' 11101011
|
||||
0xAD00, // ASCII = 'C' 10101101
|
||||
0xB500, // ASCII = 'D' 10110101
|
||||
0xEE00, // ASCII = 'E' 1110111
|
||||
0xDB00, // ASCII = 'F' 11011011
|
||||
0xFD00, // ASCII = 'G' 11111101
|
||||
0xAA80, // ASCII = 'H' 101010101
|
||||
0xFE00, // ASCII = 'I' 1111111
|
||||
0xFE80, // ASCII = 'J' 111111101
|
||||
0xBE80, // ASCII = 'K' 101111101
|
||||
0xD700, // ASCII = 'L' 11010111
|
||||
0xBB00, // ASCII = 'M' 10111011
|
||||
0xDD00, // ASCII = 'N' 11011101
|
||||
0xAB00, // ASCII = 'O' 10101011
|
||||
0xD500, // ASCII = 'P' 11010101
|
||||
0xEE80, // ASCII = 'Q' 111011101
|
||||
0xAF00, // ASCII = 'R' 10101111
|
||||
0xDE00, // ASCII = 'S' 1101111
|
||||
0xDA00, // ASCII = 'T' 1101101
|
||||
0xAB80, // ASCII = 'U' 101010111
|
||||
0xDA80, // ASCII = 'V' 110110101
|
||||
0xAE80, // ASCII = 'W' 101011101
|
||||
0xBA80, // ASCII = 'X' 101110101
|
||||
0xBD80, // ASCII = 'Y' 101111011
|
||||
0xAB40, // ASCII = 'Z' 1010101101
|
||||
0xFB80, // ASCII = '[' 1111101110
|
||||
0xF780, // ASCII = '\' 111101111
|
||||
0xFD80, // ASCII = ']' 111111011
|
||||
0xAFC0, // ASCII = '^' 1010111111
|
||||
0xB680, // ASCII = '_' 101101101
|
||||
0xB7C0, // ASCII = '`' 1011011111
|
||||
0xB000, // ASCII = 'a' 1011
|
||||
0xBE00, // ASCII = 'b' 1011111
|
||||
0xBC00, // ASCII = 'c' 101111
|
||||
0xB400, // ASCII = 'd' 101101
|
||||
0xC000, // ASCII = 'e' 11
|
||||
0xF400, // ASCII = 'f' 111101
|
||||
0xB600, // ASCII = 'g' 1011011
|
||||
0xAC00, // ASCII = 'h' 101011
|
||||
0xD000, // ASCII = 'i' 1101
|
||||
0xF580, // ASCII = 'j' 111101011
|
||||
0xBF00, // ASCII = 'k' 10111111
|
||||
0xD800, // ASCII = 'l' 11011
|
||||
0xEC00, // ASCII = 'm' 111011
|
||||
0xF000, // ASCII = 'n' 1111
|
||||
0xE000, // ASCII = 'o' 111
|
||||
0xFC00, // ASCII = 'p' 111111
|
||||
0xDF80, // ASCII = 'q' 110111111
|
||||
0xA800, // ASCII = 'r' 10101
|
||||
0xB800, // ASCII = 's' 10111
|
||||
0xA000, // ASCII = 't' 101
|
||||
0xDC00, // ASCII = 'u' 110111
|
||||
0xF600, // ASCII = 'v' 1111011
|
||||
0xD600, // ASCII = 'w' 1101011
|
||||
0xDF00, // ASCII = 'x' 11011111
|
||||
0xBA00, // ASCII = 'y' 1011101
|
||||
0xEA80, // ASCII = 'z' 111010101
|
||||
0xADC0, // ASCII = '{' 1010110111
|
||||
0xDD80, // ASCII = '|' 110111011
|
||||
0xAD40, // ASCII = '}' 1010110101
|
||||
0xB5C0, // ASCII = '~' 1011010111
|
||||
0xED40 // ASCII = 127 1110110101
|
||||
};
|
||||
@@ -1,111 +0,0 @@
|
||||
/*
|
||||
|
||||
Record sound and then plays it back a few times.
|
||||
Very low sound quality @ 2KHz 0.75 seconds
|
||||
A bit robotic and weird
|
||||
|
||||
*/
|
||||
|
||||
#include <HAMShield.h>
|
||||
#include <Wire.h>
|
||||
|
||||
#define RATE 500
|
||||
#define SIZE 1500
|
||||
|
||||
HAMShield radio;
|
||||
|
||||
char sound[SIZE];
|
||||
unsigned int sample1;
|
||||
int x = -1;
|
||||
int16_t rssi;
|
||||
byte mode = 8;
|
||||
|
||||
void setup() {
|
||||
Wire.begin();
|
||||
// int result = radio.testConnection();
|
||||
radio.initialize();
|
||||
radio.setFrequency(446000);
|
||||
setPwmFrequency(9, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void loop() {
|
||||
rssi = radio.readRSSI();
|
||||
if(rssi > -100) {
|
||||
if(x == -1) {
|
||||
for(x = 0; x < SIZE; x++) {
|
||||
if(mode == 4) {
|
||||
sample1 = analogRead(0);
|
||||
sound[x] = sample1 >> 4;
|
||||
delayMicroseconds(RATE); x++;
|
||||
sample1 = analogRead(0);
|
||||
sound[x] = (sample1 & 0xF0) | sound[x];
|
||||
delayMicroseconds(RATE);
|
||||
} else {
|
||||
sound[x] = analogRead(0);
|
||||
delayMicroseconds(RATE); x++;
|
||||
sound[x] = analogRead(0);
|
||||
delayMicroseconds(RATE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(rssi < -100) {
|
||||
if(x == 1500) {
|
||||
radio.setModeTransmit();
|
||||
delay(500);
|
||||
tone(9,1000,500); delay(750);
|
||||
for(int r = 0; r < 10; r++) {
|
||||
for(x = 0; x < SIZE; x++) {
|
||||
if(mode == 4) {
|
||||
|
||||
analogWrite(9,sound[x] << 4);
|
||||
delayMicroseconds(RATE); x++;
|
||||
analogWrite(9,sound[x] & 0xF);
|
||||
delayMicroseconds(RATE); } else {
|
||||
|
||||
analogWrite(9,sound[x]);
|
||||
delayMicroseconds(RATE); x++;
|
||||
analogWrite(9,sound[x]);
|
||||
delayMicroseconds(RATE);
|
||||
}
|
||||
} }
|
||||
tone(9,1000,500); delay(750);
|
||||
radio.setModeReceive();
|
||||
x = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void setPwmFrequency(int pin, int divisor) {
|
||||
byte mode;
|
||||
if(pin == 5 || pin == 6 || pin == 9 || pin == 10) {
|
||||
switch(divisor) {
|
||||
case 1: mode = 0x01; break;
|
||||
case 8: mode = 0x02; break;
|
||||
case 64: mode = 0x03; break;
|
||||
case 256: mode = 0x04; break;
|
||||
case 1024: mode = 0x05; break;
|
||||
default: return;
|
||||
}
|
||||
if(pin == 5 || pin == 6) {
|
||||
TCCR0B = TCCR0B & 0b11111000 | mode;
|
||||
} else {
|
||||
TCCR1B = TCCR1B & 0b11111000 | mode;
|
||||
}
|
||||
} else if(pin == 3 || pin == 11) {
|
||||
switch(divisor) {
|
||||
case 1: mode = 0x01; break;
|
||||
case 8: mode = 0x02; break;
|
||||
case 32: mode = 0x03; break;
|
||||
case 64: mode = 0x04; break;
|
||||
case 128: mode = 0x05; break;
|
||||
case 256: mode = 0x06; break;
|
||||
case 1024: mode = 0x7; break;
|
||||
default: return;
|
||||
}
|
||||
TCCR2B = TCCR2B & 0b11111000 | mode;
|
||||
}
|
||||
}
|
||||
|
||||
124
examples/QPSK63Transmit/QPSK63Transmit.ino
Normal file
124
examples/QPSK63Transmit/QPSK63Transmit.ino
Normal file
@@ -0,0 +1,124 @@
|
||||
/* Hamshield
|
||||
* Example: QPSK63Transmit
|
||||
* This is a simple example to demonstrate HamShield QPSK63
|
||||
* transmit functionality.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Connect the Arduino to wall
|
||||
* power and then to your computer via USB. After uploading
|
||||
* this program to your Arduino, tune a QPSK63 receiver and
|
||||
* wait to receive the message "Why hello there, friend.
|
||||
* Nice to meet you. Welcome to QPSK63. 73, VE6SLP sk"
|
||||
*/
|
||||
|
||||
#include <HamShield.h>
|
||||
#include <DDS.h>
|
||||
#include "varicode.h"
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
DDS dds;
|
||||
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
digitalWrite(RESET_PIN, LOW);
|
||||
|
||||
|
||||
Serial.begin(9600);
|
||||
// put your setup code here, to run once:
|
||||
dds.setReferenceClock(32000);
|
||||
dds.start();
|
||||
dds.setFrequency(1000);
|
||||
dds.on();
|
||||
}
|
||||
|
||||
volatile bool sent = true;
|
||||
volatile uint16_t bitsToSend = 0;
|
||||
volatile uint8_t zeroCount = 0;
|
||||
|
||||
void sendChar(uint8_t c) {
|
||||
uint16_t bits = varicode[c];
|
||||
while((bits&0x8000)==0) {
|
||||
bits<<=1;
|
||||
}
|
||||
while(!sent) {} //delay(32);
|
||||
cli();
|
||||
sent = false;
|
||||
bitsToSend = bits;
|
||||
sei();
|
||||
while(!sent) {} //delay(32);
|
||||
//PORTD &= ~_BV(2); // Diagnostic pin (D2)
|
||||
}
|
||||
|
||||
char *string = "Why hello there, friend. Nice to meet you. Welcome to QPSK63. 73, VE6SLP sk\r\n";
|
||||
void loop() {
|
||||
int i;
|
||||
// put your main code here, to run repeatedly:
|
||||
//for(i = 0; i<5; i++)
|
||||
// sendChar(0);
|
||||
// return;
|
||||
for(i = 0; i < strlen(string); i++) {
|
||||
sendChar(string[i]);
|
||||
//Serial.println(string[i]);
|
||||
}
|
||||
}
|
||||
|
||||
const uint8_t amplitudeShape[41] = {
|
||||
255, 241, 228, 215, 203, 191, 181, 171, 161, 152, 143, 135, 128, 121, 114, 107, 101, 96, 90, 85, 80, 76, 72, 68, 64, 60, 57, 54, 51, 48, 45, 42, 40, 38, 36, 34, 32, 30, 28, 27, 25
|
||||
};
|
||||
|
||||
// This will trigger at 8kHz
|
||||
const uint16_t qpskConvolution[32] = {
|
||||
180, 90, -90, 0, -90, 0, 180, 90,
|
||||
0, -90, 90, 180, 90, 180, 0, -90,
|
||||
90, 180, 0, -90, 0, -90, 90, 180,
|
||||
-90, 0, 180, 90, 180, 90, -90, 0
|
||||
};
|
||||
uint8_t last5Bits = 0b00000;
|
||||
ISR(ADC_vect) {
|
||||
static uint8_t outer = 0;
|
||||
static uint8_t tcnt = 0;
|
||||
TIFR1 |= _BV(ICF1);
|
||||
// Wave shaping
|
||||
// TODO: Improve how this would perform.
|
||||
if(tcnt < 81)
|
||||
dds.setAmplitude(amplitudeShape[(81-tcnt)/2]);
|
||||
if(tcnt > (255-81))
|
||||
dds.setAmplitude(amplitudeShape[(tcnt-174)/2]);
|
||||
dds.clockTick();
|
||||
|
||||
if(outer++ == 1) {
|
||||
outer = 0;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if(tcnt++ == 0) { // Next bit
|
||||
last5Bits <<= 1;
|
||||
if(!sent) {
|
||||
if((bitsToSend & 0x8000) == 0) {
|
||||
zeroCount++;
|
||||
} else {
|
||||
zeroCount = 0;
|
||||
last5Bits |= 1;
|
||||
}
|
||||
dds.changePhaseDeg(qpskConvolution[last5Bits&31]);
|
||||
bitsToSend<<=1;
|
||||
if(zeroCount == 2) {
|
||||
sent = true;
|
||||
}
|
||||
} else {
|
||||
// Idle on zeroes
|
||||
dds.changePhaseDeg(qpskConvolution[last5Bits&31]);
|
||||
}
|
||||
}
|
||||
}
|
||||
130
examples/QPSK63Transmit/varicode.h
Normal file
130
examples/QPSK63Transmit/varicode.h
Normal file
@@ -0,0 +1,130 @@
|
||||
const uint16_t varicode[] = {
|
||||
0xAAC0, // ASCII = 0 1010101011
|
||||
0xB6C0, // ASCII = 1 1011011011
|
||||
0xBB40, // ASCII = 2 1011101101
|
||||
0xDDC0, // ASCII = 3 1101110111
|
||||
0xBAC0, // ASCII = 4 1011101011
|
||||
0xD7C0, // ASCII = 5 1101011111
|
||||
0xBBC0, // ASCII = 6 1011101111
|
||||
0xBF40, // ASCII = 7 1011111101
|
||||
0xBFC0, // ASCII = 8 1011111111
|
||||
0xEF00, // ASCII = 9 11101111
|
||||
0xE800, // ASCII = 10 11101
|
||||
0xDBC0, // ASCII = 11 1101101111
|
||||
0xB740, // ASCII = 12 1011011101
|
||||
0xF800, // ASCII = 13 11111
|
||||
0xDD40, // ASCII = 14 1101110101
|
||||
0xEAC0, // ASCII = 15 1110101011
|
||||
0xBDC0, // ASCII = 16 1011110111
|
||||
0xBD40, // ASCII = 17 1011110101
|
||||
0xEB40, // ASCII = 18 1110101101
|
||||
0xEBC0, // ASCII = 19 1110101111
|
||||
0xD6C0, // ASCII = 20 1101011011
|
||||
0xDAC0, // ASCII = 21 1101101011
|
||||
0xDB40, // ASCII = 22 1101101101
|
||||
0xD5C0, // ASCII = 23 1101010111
|
||||
0xDEC0, // ASCII = 24 1101111011
|
||||
0xDF40, // ASCII = 25 1101111101
|
||||
0xEDC0, // ASCII = 26 1110110111
|
||||
0xD540, // ASCII = 27 1101010101
|
||||
0xD740, // ASCII = 28 1101011101
|
||||
0xEEC0, // ASCII = 29 1110111011
|
||||
0xBEC0, // ASCII = 30 1011111011
|
||||
0xDFC0, // ASCII = 31 1101111111
|
||||
0x8000, // ASCII = ' ' 1
|
||||
0xFF80, // ASCII = '!' 111111111
|
||||
0xAF80, // ASCII = '"' 101011111
|
||||
0xFA80, // ASCII = '#' 111110101
|
||||
0xED80, // ASCII = '$' 111011011
|
||||
0xB540, // ASCII = '%' 1011010101
|
||||
0xAEC0, // ASCII = '&' 1010111011
|
||||
0xBF80, // ASCII = ''' 101111111
|
||||
0xFB00, // ASCII = '(' 11111011
|
||||
0xF700, // ASCII = ')' 11110111
|
||||
0xB780, // ASCII = '*' 101101111
|
||||
0xEF80, // ASCII = '+' 111011111
|
||||
0xEA00, // ASCII = ',' 1110101
|
||||
0xD400, // ASCII = '-' 110101
|
||||
0xAE00, // ASCII = '.' 1010111
|
||||
0xD780, // ASCII = '/' 110101111
|
||||
0xB700, // ASCII = '0' 10110111
|
||||
0xBD00, // ASCII = '1' 10111101
|
||||
0xED00, // ASCII = '2' 11101101
|
||||
0xFF00, // ASCII = '3' 11111111
|
||||
0xBB80, // ASCII = '4' 101110111
|
||||
0xAD80, // ASCII = '5' 101011011
|
||||
0xB580, // ASCII = '6' 101101011
|
||||
0xD680, // ASCII = '7' 110101101
|
||||
0xD580, // ASCII = '8' 110101011
|
||||
0xDB80, // ASCII = '9' 110110111
|
||||
0xF500, // ASCII = ':' 11110101
|
||||
0xDE80, // ASCII = ';' 110111101
|
||||
0xF680, // ASCII = '<' 111101101
|
||||
0xAA00, // ASCII = '=' 1010101
|
||||
0xEB80, // ASCII = '>' 111010111
|
||||
0xABC0, // ASCII = '?' 1010101111
|
||||
0xAF40, // ASCII = '@' 1010111101
|
||||
0xFA00, // ASCII = 'A' 1111101
|
||||
0xEB00, // ASCII = 'B' 11101011
|
||||
0xAD00, // ASCII = 'C' 10101101
|
||||
0xB500, // ASCII = 'D' 10110101
|
||||
0xEE00, // ASCII = 'E' 1110111
|
||||
0xDB00, // ASCII = 'F' 11011011
|
||||
0xFD00, // ASCII = 'G' 11111101
|
||||
0xAA80, // ASCII = 'H' 101010101
|
||||
0xFE00, // ASCII = 'I' 1111111
|
||||
0xFE80, // ASCII = 'J' 111111101
|
||||
0xBE80, // ASCII = 'K' 101111101
|
||||
0xD700, // ASCII = 'L' 11010111
|
||||
0xBB00, // ASCII = 'M' 10111011
|
||||
0xDD00, // ASCII = 'N' 11011101
|
||||
0xAB00, // ASCII = 'O' 10101011
|
||||
0xD500, // ASCII = 'P' 11010101
|
||||
0xEE80, // ASCII = 'Q' 111011101
|
||||
0xAF00, // ASCII = 'R' 10101111
|
||||
0xDE00, // ASCII = 'S' 1101111
|
||||
0xDA00, // ASCII = 'T' 1101101
|
||||
0xAB80, // ASCII = 'U' 101010111
|
||||
0xDA80, // ASCII = 'V' 110110101
|
||||
0xAE80, // ASCII = 'W' 101011101
|
||||
0xBA80, // ASCII = 'X' 101110101
|
||||
0xBD80, // ASCII = 'Y' 101111011
|
||||
0xAB40, // ASCII = 'Z' 1010101101
|
||||
0xFB80, // ASCII = '[' 1111101110
|
||||
0xF780, // ASCII = '\' 111101111
|
||||
0xFD80, // ASCII = ']' 111111011
|
||||
0xAFC0, // ASCII = '^' 1010111111
|
||||
0xB680, // ASCII = '_' 101101101
|
||||
0xB7C0, // ASCII = '`' 1011011111
|
||||
0xB000, // ASCII = 'a' 1011
|
||||
0xBE00, // ASCII = 'b' 1011111
|
||||
0xBC00, // ASCII = 'c' 101111
|
||||
0xB400, // ASCII = 'd' 101101
|
||||
0xC000, // ASCII = 'e' 11
|
||||
0xF400, // ASCII = 'f' 111101
|
||||
0xB600, // ASCII = 'g' 1011011
|
||||
0xAC00, // ASCII = 'h' 101011
|
||||
0xD000, // ASCII = 'i' 1101
|
||||
0xF580, // ASCII = 'j' 111101011
|
||||
0xBF00, // ASCII = 'k' 10111111
|
||||
0xD800, // ASCII = 'l' 11011
|
||||
0xEC00, // ASCII = 'm' 111011
|
||||
0xF000, // ASCII = 'n' 1111
|
||||
0xE000, // ASCII = 'o' 111
|
||||
0xFC00, // ASCII = 'p' 111111
|
||||
0xDF80, // ASCII = 'q' 110111111
|
||||
0xA800, // ASCII = 'r' 10101
|
||||
0xB800, // ASCII = 's' 10111
|
||||
0xA000, // ASCII = 't' 101
|
||||
0xDC00, // ASCII = 'u' 110111
|
||||
0xF600, // ASCII = 'v' 1111011
|
||||
0xD600, // ASCII = 'w' 1101011
|
||||
0xDF00, // ASCII = 'x' 11011111
|
||||
0xBA00, // ASCII = 'y' 1011101
|
||||
0xEA80, // ASCII = 'z' 111010101
|
||||
0xADC0, // ASCII = '{' 1010110111
|
||||
0xDD80, // ASCII = '|' 110111011
|
||||
0xAD40, // ASCII = '}' 1010110101
|
||||
0xB5C0, // ASCII = '~' 1011010111
|
||||
0xED40 // ASCII = 127 1110110101
|
||||
};
|
||||
@@ -1,30 +1,49 @@
|
||||
/*
|
||||
|
||||
Sends an SSTV test pattern
|
||||
|
||||
/* Hamshield
|
||||
* Example: SSTV
|
||||
* This program will transmit a test pattern. You will need
|
||||
* SSTV equipment to test the output.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Connect the Arduino to wall
|
||||
* power and then to your computer via USB. After uploading
|
||||
* this program to your Arduino, open the Serial Monitor to
|
||||
* view the status of the program. Tune your SSTV to
|
||||
* 446MHz to receive the image output.
|
||||
*/
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
#define DOT 100
|
||||
#define CALLSIGN "1ZZ9ZZ/B"
|
||||
|
||||
/* Standard libraries and variable init */
|
||||
|
||||
#include <HAMShield.h>
|
||||
#include <Wire.h>
|
||||
#include <HamShield.h>
|
||||
|
||||
HAMShield radio;
|
||||
HamShield radio;
|
||||
int16_t rssi;
|
||||
|
||||
/* get our radio ready */
|
||||
|
||||
void setup() {
|
||||
Wire.begin();
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
Serial.begin(9600);
|
||||
Serial.print("Radio status: ");
|
||||
int result = radio.testConnection();
|
||||
Serial.println(result);
|
||||
radio.initialize();
|
||||
radio.setFrequency(446000);
|
||||
radio.frequency(446000);
|
||||
radio.setModeReceive();
|
||||
}
|
||||
|
||||
@@ -32,7 +51,7 @@ void setup() {
|
||||
|
||||
|
||||
void loop() {
|
||||
if(radio.waitForChannel(1000,2000)) { // Wait forever for calling frequency to open, then wait 2 seconds for breakers
|
||||
if(radio.waitForChannel(1000,2000, -90)) { // Wait forever for calling frequency to open, then wait 2 seconds for breakers
|
||||
radio.setModeTransmit(); // Turn on the transmitter
|
||||
delay(250); // Wait a moment
|
||||
radio.SSTVTestPattern(MARTIN1); // send a MARTIN1 test pattern
|
||||
|
||||
453
examples/SSTV_M1_Static/SSTV_M1_Static.ino
Normal file
453
examples/SSTV_M1_Static/SSTV_M1_Static.ino
Normal file
@@ -0,0 +1,453 @@
|
||||
/* Hamshield
|
||||
* Example: SSTV M1 Static
|
||||
* This program will transmit a static image. You will need
|
||||
* SSTV equipment to test the output.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Connect the Arduino to wall
|
||||
* power and then to your computer via USB. After uploading
|
||||
* this program to your Arduino, open the Serial Monitor to
|
||||
* view the status of the program. Tune your SSTV to
|
||||
* 145.5MHz to receive the image output.
|
||||
*/
|
||||
|
||||
// So the precalculated values will get stored
|
||||
#define DDS_REFCLK_DEFAULT (34965/2)
|
||||
|
||||
#include <HamShield.h>
|
||||
#include <DDS.h>
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
HamShield radio;
|
||||
DDS dds;
|
||||
// Defined at the end of the sketch
|
||||
extern const uint16_t image[256*20] PROGMEM;
|
||||
|
||||
#define F_1200 0
|
||||
#define F_1500 1
|
||||
#define F_2400 2
|
||||
ddsAccumulator_t freqTable[3];
|
||||
|
||||
void setup() {
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
Serial.begin(9600);
|
||||
|
||||
// Query the HamShield for status information
|
||||
Serial.print("Radio status: ");
|
||||
int result = 0;
|
||||
result = radio.testConnection();
|
||||
Serial.println(result,DEC);
|
||||
|
||||
// Tell the HamShield to start up
|
||||
radio.initialize();
|
||||
radio.setRfPower(0);
|
||||
radio.frequency(145500);
|
||||
// put your setup code here, to run once:
|
||||
//dds.setReferenceClock(34965/4);
|
||||
dds.start();
|
||||
freqTable[F_1200] = dds.calcFrequency(1200);
|
||||
freqTable[F_1500] = dds.calcFrequency(1500);
|
||||
freqTable[F_2400] = dds.calcFrequency(2400);
|
||||
dds.setFrequency(1000);
|
||||
dds.on();
|
||||
Serial.println("DDS on");
|
||||
delay(1000);
|
||||
dds.off();
|
||||
delay(2000);
|
||||
Serial.println("Next");
|
||||
}
|
||||
|
||||
uint8_t code = MARTIN1;
|
||||
bool parityCalc(int code) {
|
||||
unsigned int v; // word value to compute the parity of
|
||||
bool parity = false; // parity will be the parity of v
|
||||
|
||||
while (code)
|
||||
{
|
||||
parity = !parity;
|
||||
code = code & (code - 1);
|
||||
}
|
||||
|
||||
return parity;
|
||||
}
|
||||
|
||||
volatile bool registered = false;
|
||||
volatile bool scanning = false;
|
||||
volatile bool done = false;
|
||||
volatile uint16_t nextBlock = 0;
|
||||
volatile uint8_t currentScanline = 0;
|
||||
volatile uint16_t scanline[2][20];
|
||||
|
||||
// Format is 3 'images', one each for green, blue and red
|
||||
// But we don't have room, so it's monochrome
|
||||
// 256 rows each
|
||||
// 10 sets of 32 bits encoding on/off for the colour
|
||||
//const unsigned long image[256][10] PROGMEM = {
|
||||
|
||||
//};
|
||||
|
||||
void loadScanline(uint8_t s, int y) {
|
||||
for(int i = 0; i < 20; i++) {
|
||||
scanline[s][i] = pgm_read_word_near(image + y*20 + i);
|
||||
}
|
||||
}
|
||||
#define DON() PORTD |= _BV(2);
|
||||
#define DOFF() PORTD &= ~_BV(2);
|
||||
void loop() {
|
||||
// Load the first scanline
|
||||
loadScanline(0, 0);
|
||||
radio.setModeTransmit();
|
||||
delay(500);
|
||||
// VIS
|
||||
dds.playWait(1900,300);
|
||||
dds.playWait(1200,10);
|
||||
dds.playWait(1900,300);
|
||||
dds.playWait(1200,30);
|
||||
for(int x = 0; x < 7; x++) {
|
||||
if(bitRead(code,x)) { dds.playWait(1100,30); } else { dds.playWait(1300,30); }
|
||||
}
|
||||
if(parityCalc(code)) { dds.playWait(1300,30); } else { dds.playWait(1100,30); }
|
||||
dds.playWait(1200,30);
|
||||
dds.on();
|
||||
for(int y = 1; y < 256; y++){
|
||||
DON();
|
||||
dds.setPrecalcFrequency(freqTable[F_1200]);
|
||||
// Subtract for the timer ticks
|
||||
delayMicroseconds(3562); // sync pulse (4862 uS)
|
||||
DOFF();
|
||||
DON();
|
||||
dds.setPrecalcFrequency(freqTable[F_1500]);
|
||||
// Subtract for the timer ticks
|
||||
delayMicroseconds(442); // sync porch (572 uS)
|
||||
DOFF();
|
||||
scanning = true;
|
||||
for(uint8_t c = 0; c<3; c++) {
|
||||
scanning = true;
|
||||
while(!registered);
|
||||
registered = false;
|
||||
loadScanline((++currentScanline) & 1, y);
|
||||
while(!done);
|
||||
dds.setPrecalcFrequency(freqTable[F_1500]);
|
||||
done = false;
|
||||
scanning = false;
|
||||
DON();
|
||||
delayMicroseconds(442); // color separator pulse (572 uS)
|
||||
DOFF();
|
||||
}
|
||||
}
|
||||
dds.off();
|
||||
radio.setModeReceive();
|
||||
delay(10000);
|
||||
return;
|
||||
}
|
||||
|
||||
// The DDS is running faster than the pixel clock, so we
|
||||
// only update the pixel frequency every few ticks.
|
||||
ISR(ADC_vect) {
|
||||
static uint8_t tcnt = 0;
|
||||
static uint8_t shifts = 0;
|
||||
static uint8_t shiftingLine = 0;
|
||||
static uint8_t linePos = 0;
|
||||
static uint16_t pixelBlock;
|
||||
TIFR1 |= _BV(ICF1);
|
||||
dds.clockTick();
|
||||
if(scanning) {
|
||||
if(++tcnt == 8) {
|
||||
tcnt = 0;
|
||||
if(linePos == 21) {
|
||||
done = true;
|
||||
linePos = 0;
|
||||
}
|
||||
if(linePos == 0) {
|
||||
shifts = 0;
|
||||
shiftingLine = currentScanline&1;
|
||||
registered = true;
|
||||
}
|
||||
if(shifts == 0) {
|
||||
pixelBlock = scanline[shiftingLine][linePos++];
|
||||
}
|
||||
|
||||
if(pixelBlock & 0x8000) {
|
||||
dds.setPrecalcFrequency(freqTable[F_2400]);
|
||||
} else {
|
||||
dds.setPrecalcFrequency(freqTable[F_1500]);
|
||||
}
|
||||
if(++shifts == 16) {
|
||||
shifts = 0;
|
||||
}
|
||||
pixelBlock <<= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Image is 256 lines * 320 pixels per line, packed to 16 bits at a time
|
||||
const uint16_t image[256*20] PROGMEM = {
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 1
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 2
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 3
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 4
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF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E13F, 0xCFFE, 0x7F9F, 0xE7F9, 0xE0E4, 0x71E7, 0xFE43, 0xCF0F, 0x3C27, 0xFFFF, 0xFFFF, 0xFFFF, // Line 29
|
||||
0xFFFE, 0x7FF3, 0xFCFF, 0x3FCE, 0x0300, 0x071F, 0xF00E, 0x7019, 0xC03F, 0xCFFE, 0x7F9F, 0xE7F9, 0xC060, 0x00E3, 0xFE01, 0xCE03, 0x3807, 0xFFFF, 0xFFFF, 0xFFFF, // Line 30
|
||||
0xFFFE, 0x7FF3, 0xFE7F, 0x000C, 0xF31C, 0x7381, 0xF1E6, 0x6799, 0x9E3F, 0xCFFE, 0x7FCF, 0xE001, 0x9E63, 0x8E70, 0x3E3C, 0xCCF3, 0x33C7, 0xFFFF, 0xFFFF, 0xFFFF, // Line 31
|
||||
0xFFFE, 0x7FF3, 0xFC7F, 0x000F, 0x833C, 0xF3F0, 0x73E6, 0x67C9, 0x9F3F, 0xCFFE, 0x7F8F, 0xE001, 0xF067, 0x9E7E, 0x0E7C, 0xCCF9, 0x33E7, 0xFFFF, 0xFFFF, 0xFFFF, // Line 32
|
||||
0xFFFE, 0x7FF3, 0xFCFF, 0x3FCE, 0x033C, 0xF3FF, 0x33E6, 0x6009, 0x9F3F, 0xCFFE, 0x7F9F, 0xE7F9, 0xC067, 0x9E7F, 0xE67C, 0xCC01, 0x33E7, 0xFFFF, 0xFFFF, 0xFFFF, // Line 33
|
||||
0xFFFE, 0x7FB3, 0xFCFF, 0x3FCC, 0xF33C, 0xF3FF, 0x33E6, 0x67F9, 0x9F3F, 0xCFF6, 0x7F9F, 0xE7F9, 0x9E67, 0x9E7F, 0xE67C, 0xCCFF, 0x33E7, 0xFFFF, 0xFFFF, 0xFFFF, // Line 34
|
||||
0xFFFF, 0x3F19, 0xE0FF, 0x3FCC, 0xF33C, 0xF33F, 0x33E6, 0x67F9, 0x9F3F, 0xE7E3, 0x3C1F, 0xE7F9, 0x9E67, 0x9E67, 0xE67C, 0xCCFF, 0x33E7, 0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FFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 72
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFE0, 0x0000, 0x0007, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8000, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 73
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFE0, 0x0000, 0x0007, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8000, 0x0001, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 74
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFE0, 0x0000, 0x0007, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8000, 0x0001, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 75
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFE0, 0x0000, 0x0007, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8000, 0x0003, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 76
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFE0, 0x0000, 0x0007, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8000, 0x0003, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 77
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFE0, 0x0000, 0x0007, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8000, 0x0007, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 78
|
||||
0xFFFF, 0xFFF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F, 0xFFFF, // Line 170
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8000, 0x0003, 0xFFFF, 0xFFFF, 0xFFFF, 0xFF80, 0x0000, 0x003F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 171
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xE000, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, 0xFC00, 0x0000, 0x007F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 172
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFC00, 0x0000, 0x3FFF, 0xFFFF, 0xFFFF, 0xF000, 0x0000, 0x01FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 173
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFF00, 0x0000, 0x07FF, 0xFFFF, 0xFFFF, 0xC000, 0x0000, 0x03FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 174
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFF80, 0x0000, 0x001F, 0xFFFF, 0xFFF8, 0x0000, 0x0000, 0x0FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 175
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFE0, 0x0000, 0x0000, 0x1FFF, 0xA000, 0x0000, 0x0000, 0x7FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 176
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFF8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 177
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFE, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x000F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 178
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x8000, 0x0000, 0x0000, 0x0000, 0x0000, 0x003F, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 179
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xE000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00FF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 180
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xF800, 0x0000, 0x0000, 0x0000, 0x0000, 0x0FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 181
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFE00, 0x0000, 0x0000, 0x0000, 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 182
|
||||
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFF80, 0x0000, 0x0000, 0x0000, 0x0007, 0xFFFF, 0xFFFF, 0xFF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FFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, // Line 256
|
||||
};
|
||||
92
examples/SerialTransceiver/SerialTransceiver.ino
Executable file → Normal file
92
examples/SerialTransceiver/SerialTransceiver.ino
Executable file → Normal file
@@ -1,6 +1,19 @@
|
||||
/*
|
||||
|
||||
SerialTransceiver is TTL Serial port "glue" to allow desktop or laptop control of the HAMShield
|
||||
/* Hamshield
|
||||
* Example: Serial Tranceiver
|
||||
* SerialTransceiver is TTL Serial port "glue" to allow
|
||||
* desktop or laptop control of the HamShield.
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Plug a pair of headphones into
|
||||
* the HamShield. Connect the Arduino to wall power and then
|
||||
* to your computer via USB. After uploading this program to
|
||||
* your Arduino, open the Serial Monitor. Use the bar at the
|
||||
* top of the serial monitor to enter commands as seen below.
|
||||
*
|
||||
* EXAMPLE: To change the repeater offset to 144.425MHz,
|
||||
* enable offset, then key in, use the following commands:
|
||||
* T144425;
|
||||
* R1;
|
||||
* [Just a space]
|
||||
|
||||
Commands:
|
||||
|
||||
@@ -8,27 +21,14 @@ Mode ASCII Description
|
||||
-------------- ----------- -------------------------------------------------------------------------------------------------------------------------------------------- -----------------
|
||||
Transmit space Space must be received at least every 500 mS Yes
|
||||
Receive not space If space is not received and/or 500 mS timeout of space occurs, unit will go into receive mode Yes
|
||||
CTCSS In A<tone>; <tone> must be a numerical ascii value with decimal point indicating CTCSS receive tone required to unsquelch No
|
||||
CTCSS Out B<tone>; <tone> must be a numerical ascii value with decimal point indicating CTCSS transmit tone No
|
||||
CTCSS Enable C<state>; Turns on CTCSS mode (analog tone) with 1, off with 0. No
|
||||
CDCSS Enable D<state>; Turns on CDCSS mode (digital tone) with 1, off with 0. No
|
||||
Bandwidth E<mode>; for 12.5KHz mode is 0, for 25KHz, mode is 1 No
|
||||
Frequency F<freq>; Set the receive frequency in KHz, if offset is disabled, this is the transmit frequency No
|
||||
CDCSS In G<code>; <code> must be a valid CDCSS code No
|
||||
CDCSS Out H<code>; <code> must be a valid CDCSS code No
|
||||
Print tones I Prints out all configured tones and codes, coma delimited in format: CTCSS In, CTCSS Out, CDCSS In, CDCSS Out No
|
||||
Morse Out M<text>; A small buffer for morse code (32 chars)
|
||||
Power level P<level>; Set the power amp level, 0 = lowest, 15 = highest No
|
||||
Enable Offset R<state>; 1 turns on repeater offset mode, 0 turns off repeater offset mode No
|
||||
Squelch S<level>; Set the squelch level No
|
||||
TX Offset T<freq>; The absolute frequency of the repeater offset to transmit on in KHz No
|
||||
Volume V<level>; Set the volume level of the receiver No
|
||||
Reset X Reset all settings to default No
|
||||
Sleep Z Sleep radio No
|
||||
Filters @<state>; Set bit to enable, clear bit to disable: 0 = pre/de-emphasis, 1 = high pass filter, 2 = low pass filter (default: ascii 7, all enabled) No
|
||||
Vox mode $<state>; 0 = vox off, >= 1 audio sensitivity. lower value more sensitive No
|
||||
Mic Channel *<state>; Set the voice channel. 0 = signal from mic or arduino, 1 = internal tone generator No
|
||||
RSSI ? Respond with the current receive level in - dBm (no sign provided on numerical response) No
|
||||
Tone Gen % (notes) To send a tone, use the following format: Single tone: %1,<freq>,<length>; Dual tone: %2,<freq>,<freq>,<length>; DTMF: %3,<key>,<length>; No
|
||||
Voice Level ^ Respond with the current voice level (VSSI)
|
||||
|
||||
|
||||
@@ -45,8 +45,11 @@ Debug Msg @<text>; 32 character debug message
|
||||
|
||||
*/
|
||||
|
||||
#include "Wire.h"
|
||||
#include "HAMShield.h"
|
||||
#include "HamShield.h"
|
||||
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
int state;
|
||||
int txcount = 0;
|
||||
@@ -62,26 +65,37 @@ int cdcssin = 0;
|
||||
int cdcssout = 0;
|
||||
|
||||
|
||||
HAMShield radio;
|
||||
HamShield radio;
|
||||
|
||||
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
Serial.print(";;;;;;;;;;;;;;;;;;;;;;;;;;");
|
||||
Wire.begin();
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
Serial.begin(9600);
|
||||
Serial.println(";;;;;;;;;;;;;;;;;;;;;;;;;;");
|
||||
|
||||
int result = radio.testConnection();
|
||||
Serial.print("*");
|
||||
Serial.print(result,DEC);
|
||||
Serial.print(";");
|
||||
Serial.println(";");
|
||||
radio.initialize(); // initializes automatically for UHF 12.5kHz channel
|
||||
Serial.print("*START;");
|
||||
Serial.println("*START;");
|
||||
radio.frequency(freq);
|
||||
radio.setVolume1(0xF);
|
||||
radio.setVolume2(0xF);
|
||||
radio.setModeReceive();
|
||||
radio.setTxSourceMic();
|
||||
radio.setRfPower(9);
|
||||
radio.setRfPower(0);
|
||||
radio.setSQLoThresh(80);
|
||||
radio.setSQOn();
|
||||
}
|
||||
@@ -103,17 +117,16 @@ void loop() {
|
||||
|
||||
case 32: // space - transmit
|
||||
if(repeater == 1) { radio.frequency(tx); }
|
||||
radio.setRX(0);
|
||||
radio.setTX(1);
|
||||
radio.setModeTransmit();
|
||||
state = 10;
|
||||
Serial.print("#TX,ON;");
|
||||
Serial.println("#TX,ON;");
|
||||
timer = millis();
|
||||
break;
|
||||
|
||||
case 63: // ? - RSSI
|
||||
Serial.print(":");
|
||||
Serial.print(radio.readRSSI(),DEC);
|
||||
Serial.print(";");
|
||||
Serial.println(";");
|
||||
break;
|
||||
|
||||
case 65: // A - CTCSS In
|
||||
@@ -134,7 +147,15 @@ void loop() {
|
||||
case 70: // F - frequency
|
||||
getValue();
|
||||
freq = atol(cmdbuff);
|
||||
if(radio.frequency(freq) == true) { Serial.print("@"); Serial.print(freq,DEC); Serial.print(";!;"); } else { Serial.print("X1;"); }
|
||||
if(radio.frequency(freq) == true) { Serial.print("@"); Serial.print(freq,DEC); Serial.println(";!;"); } else { Serial.println("X1;"); }
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
getValue();
|
||||
radio.setModeTransmit();
|
||||
delay(300);
|
||||
radio.morseOut(cmdbuff);
|
||||
state = 10;
|
||||
break;
|
||||
|
||||
case 80: // P - power level
|
||||
@@ -165,14 +186,14 @@ void loop() {
|
||||
case 94: // ^ - VSSI (voice) level
|
||||
Serial.print(":");
|
||||
Serial.print(radio.readVSSI(),DEC);
|
||||
Serial.print(";");
|
||||
Serial.println(";");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
if(state == 10) {
|
||||
if(millis() > (timer + 500)) { Serial.print("#TX,OFF;");radio.setRX(1); radio.setTX(0); if(repeater == 1) { radio.frequency(freq); } state = 0; txcount = 0; }
|
||||
if(millis() > (timer + 500)) { Serial.println("#TX,OFF;");radio.setModeReceive(); if(repeater == 1) { radio.frequency(freq); } state = 0; txcount = 0; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,6 +205,7 @@ void getValue() {
|
||||
temp = Serial.read();
|
||||
if(temp == 59) { cmdbuff[p] = 0; Serial.print("@");
|
||||
for(int x = 0; x < 32; x++) { Serial.print(cmdbuff[x]);}
|
||||
Serial.println();
|
||||
return;
|
||||
}
|
||||
cmdbuff[p] = temp;
|
||||
@@ -191,12 +213,12 @@ void getValue() {
|
||||
if(p == 32) {
|
||||
Serial.print("@");
|
||||
for(int x = 0; x < 32; x++) {
|
||||
Serial.print(cmdbuff[x]);
|
||||
Serial.println(cmdbuff[x]);
|
||||
}
|
||||
|
||||
cmdbuff[0] = 0;
|
||||
|
||||
Serial.print("X0;"); return; } // some sort of alignment issue? lets not feed junk into whatever takes this string in
|
||||
Serial.println("X0;"); return; } // some sort of alignment issue? lets not feed junk into whatever takes this string in
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +1,35 @@
|
||||
/*
|
||||
|
||||
Plays back the current signal strength level and morses out it's call sign at the end.
|
||||
|
||||
|
||||
/* Hamshield
|
||||
* Example: Signal Test
|
||||
* Plays back the current signal strength level and morses out
|
||||
* it's call sign at the end. You will need a HandyTalkie (HT)
|
||||
* to test the output of this example. You will also need to
|
||||
* download the PCM library from
|
||||
* https://github.com/damellis/PCM
|
||||
* Connect the HamShield to your Arduino. Screw the antenna
|
||||
* into the HamShield RF jack. Plug a pair of headphones into
|
||||
* the HamShield. Connect the Arduino to wall power and then
|
||||
* to your computer via USB. After uploading this program to
|
||||
* your Arduino, open the Serial Monitor. HamShield will print
|
||||
* the results of its signal test to the Serial Monitor. To
|
||||
* test with another HandyTalkie (HT), tune in to 446MHz and
|
||||
* listen for the call sign. Then key up on your HT and make
|
||||
* sure you can hear it through the headphones attached to the
|
||||
* HamShield.
|
||||
*/
|
||||
|
||||
#define DOT 100
|
||||
#define CALLSIGN "1ZZ9ZZ/B"
|
||||
char CALLSIGN[] = "1ZZ9ZZ/B";
|
||||
|
||||
/* Standard libraries and variable init */
|
||||
|
||||
#include <HAMShield.h>
|
||||
#include <Wire.h>
|
||||
#include <HamShield.h>
|
||||
#include <PCM.h>
|
||||
|
||||
HAMShield radio;
|
||||
#define PWM_PIN 3
|
||||
#define RESET_PIN A3
|
||||
#define SWITCH_PIN 2
|
||||
|
||||
HamShield radio;
|
||||
int16_t rssi;
|
||||
int peak = -150;
|
||||
char sig[8];
|
||||
@@ -74,13 +89,23 @@ const unsigned char dbm[] PROGMEM = {
|
||||
/* get our radio ready */
|
||||
|
||||
void setup() {
|
||||
Wire.begin();
|
||||
// NOTE: if not using PWM out, it should be held low to avoid tx noise
|
||||
pinMode(PWM_PIN, OUTPUT);
|
||||
digitalWrite(PWM_PIN, LOW);
|
||||
|
||||
// prep the switch
|
||||
pinMode(SWITCH_PIN, INPUT_PULLUP);
|
||||
|
||||
// set up the reset control pin
|
||||
pinMode(RESET_PIN, OUTPUT);
|
||||
digitalWrite(RESET_PIN, HIGH);
|
||||
|
||||
Serial.begin(9600);
|
||||
Serial.print("Radio status: ");
|
||||
int result = radio.testConnection();
|
||||
Serial.println(result);
|
||||
radio.initialize();
|
||||
radio.setFrequency(446000);
|
||||
radio.frequency(446000);
|
||||
radio.setVolume1(0xF);
|
||||
radio.setVolume2(0xF);
|
||||
radio.setModeReceive();
|
||||
@@ -104,7 +129,7 @@ void loop() {
|
||||
|
||||
if(rssi < -120) {
|
||||
Serial.println("Transmit On");
|
||||
radio.setTX(1);
|
||||
radio.setModeTransmit();
|
||||
delay(250);
|
||||
tone(11,1000,500);
|
||||
delay(1000);
|
||||
@@ -131,9 +156,8 @@ void loop() {
|
||||
delay(1000);
|
||||
Serial.println("done!");
|
||||
radio.morseOut(CALLSIGN);
|
||||
radio.setTX(0);
|
||||
Serial.println("Transmit off");
|
||||
radio.setModeReceive();
|
||||
Serial.println("Transmit off");
|
||||
delay(1000);
|
||||
}
|
||||
}
|
||||
|
||||
661
extras/LICENSE
Normal file
661
extras/LICENSE
Normal file
@@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
10
library.properties
Normal file
10
library.properties
Normal file
@@ -0,0 +1,10 @@
|
||||
name=HamShield
|
||||
version=1.0.2
|
||||
author=Morgan Redfield <morgan@enhancedradio.com>, Casey Halverson <casey@enhancedradio.com>
|
||||
maintainer=Morgan Redfield <morgan@enhancedradio.com>
|
||||
sentence=A library for use with HamShield by Enhanced Radio Devices.
|
||||
paragraph=
|
||||
category=Device Control
|
||||
url=http://www.hamshield.com
|
||||
architectures=*
|
||||
includes=HamShield.h
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,26 +8,24 @@
|
||||
#ifndef _HAMSHIELD_H_
|
||||
#define _HAMSHIELD_H_
|
||||
|
||||
#include "I2Cdev_rda.h"
|
||||
#include "HamShield_comms.h"
|
||||
//#include "SimpleFIFO.h"
|
||||
//#include "AFSK.h"
|
||||
//#include "DDS.h"
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
// HamShield constants
|
||||
|
||||
#define HAMSHIELD_MORSE_DOT 100 // Morse code dot length (smaller is faster WPM)
|
||||
#define HAMSHIELD_MORSE_BUFFER_SIZE 80 // Char buffer size for morse code text
|
||||
#define HAMSHIELD_AUX_BUTTON 5 // Pin assignment for AUX button
|
||||
#define HAMSHIELD_PWM_PIN 11 // Pin assignment for PWM output
|
||||
#define HAMSHIELD_AUX_BUTTON 2 // Pin assignment for AUX button
|
||||
#define HAMSHIELD_PWM_PIN 3 // Pin assignment for PWM output
|
||||
#define HAMSHIELD_EMPTY_CHANNEL_RSSI -110 // Default threshold where channel is considered "clear"
|
||||
|
||||
// button modes
|
||||
#define PTT_MODE 1
|
||||
#define RESET_MODE 2
|
||||
|
||||
// Device Constants
|
||||
#define A1846S_DEV_ADDR_SENHIGH 0b0101110
|
||||
#define A1846S_DEV_ADDR_SENLOW 0b1110001
|
||||
|
||||
|
||||
// Device Registers
|
||||
#define A1846S_CTL_REG 0x30 // control register
|
||||
#define A1846S_CLK_MODE_REG 0x04 // clk_mode
|
||||
@@ -181,7 +179,7 @@
|
||||
#define A1846S_VOX_FLAG_BIT 0 // vox out from dsp
|
||||
|
||||
// Bitfields for A1846S_RSSI_REG
|
||||
#define A1846S_RSSI_BIT 15 // RSSI readings <9:0>
|
||||
#define A1846S_RSSI_BIT 15 // RSSI readings <7:0>
|
||||
#define A1846S_RSSI_LENGTH 8
|
||||
|
||||
// Bitfields for A1846S_VSSI_REG
|
||||
@@ -235,7 +233,7 @@
|
||||
|
||||
|
||||
#define ROBOT8BW 2
|
||||
#define SC2-180 55
|
||||
#define SC2_180 55
|
||||
#define MARTIN1 44
|
||||
|
||||
// RTTY Frequencies
|
||||
@@ -252,8 +250,11 @@
|
||||
|
||||
class HamShield {
|
||||
public:
|
||||
// public singleton for ISRs to reference
|
||||
static HamShield *sHamShield; // HamShield singleton, used for ISRs mostly
|
||||
|
||||
HamShield();
|
||||
HamShield(uint8_t address);
|
||||
HamShield(uint8_t cs_pin);
|
||||
|
||||
void initialize();
|
||||
bool testConnection();
|
||||
@@ -262,47 +263,12 @@ class HamShield {
|
||||
uint16_t readCtlReg();
|
||||
void softReset();
|
||||
|
||||
// center frequency
|
||||
void setFrequency(uint32_t freq_khz);
|
||||
uint32_t getFrequency();
|
||||
// restrictions control
|
||||
void dangerMode();
|
||||
void safeMode();
|
||||
|
||||
// band
|
||||
// 00 - 400-520MHz
|
||||
// 10 - 200-260MHz
|
||||
// 11 - 134-174MHz
|
||||
void setBand(uint16_t band);
|
||||
uint16_t getBand();
|
||||
|
||||
void setUHF();
|
||||
void setVHF();
|
||||
void setNoFilters();
|
||||
bool frequency(uint32_t freq_khz);
|
||||
|
||||
// xtal frequency (kHz)
|
||||
// 12-14MHz crystal: this reg is set to crystal freq_khz
|
||||
// 24-28MHz crystal: this reg is set to crystal freq_khz / 2
|
||||
void setXtalFreq(uint16_t freq_kHz);
|
||||
uint16_t getXtalFreq();
|
||||
|
||||
// adclk frequency (kHz)
|
||||
// 12-14MHz crystal: this reg is set to crystal freq_khz / 2
|
||||
// 24-28MHz crystal: this reg is set to crystal freq_khz / 4
|
||||
void setAdcClkFreq(uint16_t freq_kHz);
|
||||
uint16_t getAdcClkFreq();
|
||||
|
||||
// clk mode
|
||||
// 12-14MHz: set to 1
|
||||
// 24-28MHz: set to 0
|
||||
void setClkMode(bool LFClk);
|
||||
bool getClkMode();
|
||||
|
||||
// clk example
|
||||
// 12.8MHz clock
|
||||
// A1846S_XTAL_FREQ_REG[15:0]= xtal_freq<15:0>=12.8*1000=12800
|
||||
// A1846S_ADCLK_FREQ_REG[12:0] =adclk_freq<15:0>=(12.8/2)*1000=6400
|
||||
// A1846S_CLK_MODE_REG[0]= clk_mode =1
|
||||
|
||||
// TX/RX control
|
||||
uint32_t getFrequency();
|
||||
|
||||
// channel mode
|
||||
// 11 - 25kHz channel
|
||||
@@ -311,13 +277,6 @@ class HamShield {
|
||||
void setChanMode(uint16_t mode);
|
||||
uint16_t getChanMode();
|
||||
|
||||
// choose tx or rx
|
||||
void setTX(bool on_noff);
|
||||
bool getTX();
|
||||
|
||||
void setRX(bool on_noff);
|
||||
bool getRX();
|
||||
|
||||
void setModeTransmit(); // turn off rx, turn on tx
|
||||
void setModeReceive(); // turn on rx, turn off tx
|
||||
void setModeOff(); // turn off rx, turn off tx, set pwr_dwn bit
|
||||
@@ -335,6 +294,7 @@ class HamShield {
|
||||
void setTxSourceNone();
|
||||
uint16_t getTxSource();
|
||||
|
||||
// PA bias voltage is unused (maybe remove this)
|
||||
// set PA_bias voltage
|
||||
// 000000: 1.01V
|
||||
// 000001:1.05V
|
||||
@@ -406,10 +366,10 @@ class HamShield {
|
||||
bool getSQState();
|
||||
|
||||
// SQ threshold
|
||||
void setSQHiThresh(uint16_t sq_hi_threshold); // Sq detect high th, rssi_cmp will be 1 when rssi>th_h_sq, unit 1/8dB
|
||||
uint16_t getSQHiThresh();
|
||||
void setSQLoThresh(uint16_t sq_lo_threshold); // Sq detect low th, rssi_cmp will be 0 when rssi<th_l_sq && time delay meet, unit 1/8 dB
|
||||
uint16_t getSQLoThresh();
|
||||
void setSQHiThresh(int16_t sq_hi_threshold); // Sq detect high th, rssi_cmp will be 1 when rssi>th_h_sq, unit 1dB
|
||||
int16_t getSQHiThresh();
|
||||
void setSQLoThresh(int16_t sq_lo_threshold); // Sq detect low th, rssi_cmp will be 0 when rssi<th_l_sq && time delay meet, unit 1dB
|
||||
int16_t getSQLoThresh();
|
||||
|
||||
// SQ out select
|
||||
void setSQOutSel();
|
||||
@@ -478,6 +438,7 @@ class HamShield {
|
||||
void setGpioLow(uint16_t gpio);
|
||||
void setGpioHi(uint16_t gpio);
|
||||
uint16_t getGpioMode(uint16_t gpio);
|
||||
uint16_t getGpios();
|
||||
|
||||
// Int
|
||||
void enableInterrupt(uint16_t interrupt);
|
||||
@@ -512,11 +473,6 @@ class HamShield {
|
||||
bool setWXChannel(uint8_t channel);
|
||||
uint8_t scanWXChannel();
|
||||
|
||||
|
||||
// restrictions control
|
||||
void dangerMode();
|
||||
void safeMode();
|
||||
|
||||
// utilities
|
||||
uint32_t scanMode(uint32_t start,uint32_t stop, uint8_t speed, uint16_t step, uint16_t threshold);
|
||||
uint32_t findWhitespace(uint32_t start,uint32_t stop, uint8_t dwell, uint16_t step, uint16_t threshold);
|
||||
@@ -526,33 +482,69 @@ class HamShield {
|
||||
static void isr_ptt();
|
||||
static void isr_reset();
|
||||
void morseOut(char buffer[HAMSHIELD_MORSE_BUFFER_SIZE]);
|
||||
char morseLookup(char letter);
|
||||
uint8_t morseLookup(char letter);
|
||||
bool waitForChannel(long timeout, long breakwindow, int setRSSI);
|
||||
void SSTVVISCode(int code);
|
||||
void SSTVTestPattern(int code);
|
||||
void toneWait(uint16_t freq, long timer);
|
||||
void toneWaitU(uint16_t freq, long timer);
|
||||
bool parityCalc(int code);
|
||||
// void AFSKOut(char buffer[80]);
|
||||
|
||||
|
||||
|
||||
//TODO: split AFSK out so it can be left out
|
||||
// AFSK routines
|
||||
//bool AFSKStart();
|
||||
//bool AFSKEnabled() { return afsk.enabled(); }
|
||||
//bool AFSKStop();
|
||||
//bool AFSKOut(const char *);
|
||||
|
||||
//class AFSK afsk;
|
||||
|
||||
private:
|
||||
uint8_t devAddr;
|
||||
uint16_t radio_i2c_buf[4];
|
||||
int pwr_control_pin;
|
||||
bool tx_active;
|
||||
bool rx_active;
|
||||
uint32_t radio_frequency;
|
||||
uint32_t FRS[];
|
||||
/* uint32_t FRS[];
|
||||
uint32_t GMRS[];
|
||||
uint32_t MURS[];
|
||||
uint32_t WX[];
|
||||
static HamShield *sHamShield; // HamShield singleton, used for ISRs mostly
|
||||
*/
|
||||
// private utility functions
|
||||
// these functions should not be called in the Arduino sketch
|
||||
// just use the above public functions to do everything
|
||||
|
||||
// int8_t A1846S::readWord(uint8_t devAddr, uint8_t regAddr, uint16_t *data, uint16_t timeout);
|
||||
// int8_t A1846S::readBits(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t *data, uint16_t timeout);
|
||||
// int8_t A1846S::readBit(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t *data, uint16_t timeout);
|
||||
// int8_t A1846S::writeWord(uint8_t devAddr, uint8_t regAddr, uint16_t *data, uint16_t timeout);
|
||||
// bool A1846S::writeBits(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t data);
|
||||
// bool A1846S::writeBit(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t data);
|
||||
void setFrequency(uint32_t freq_khz);
|
||||
void setTxBand2m();
|
||||
void setTxBand1_2m();
|
||||
void setTxBand70cm();
|
||||
|
||||
// xtal frequency (kHz)
|
||||
// 12-14MHz crystal: this reg is set to crystal freq_khz
|
||||
// 24-28MHz crystal: this reg is set to crystal freq_khz / 2
|
||||
void setXtalFreq(uint16_t freq_kHz);
|
||||
uint16_t getXtalFreq();
|
||||
|
||||
// adclk frequency (kHz)
|
||||
// 12-14MHz crystal: this reg is set to crystal freq_khz / 2
|
||||
// 24-28MHz crystal: this reg is set to crystal freq_khz / 4
|
||||
void setAdcClkFreq(uint16_t freq_kHz);
|
||||
uint16_t getAdcClkFreq();
|
||||
|
||||
// clk mode
|
||||
// 12-14MHz: set to 1
|
||||
// 24-28MHz: set to 0
|
||||
void setClkMode(bool LFClk);
|
||||
bool getClkMode();
|
||||
|
||||
// choose tx or rx
|
||||
void setTX(bool on_noff);
|
||||
bool getTX();
|
||||
|
||||
void setRX(bool on_noff);
|
||||
bool getRX();
|
||||
};
|
||||
|
||||
#endif /* _HAMSHIELD_H_ */
|
||||
114
src/HamShield_comms.cpp
Normal file
114
src/HamShield_comms.cpp
Normal file
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* Based loosely on I2Cdev by Jeff Rowberg, except for all kludgy bit-banging
|
||||
*/
|
||||
|
||||
#include "HamShield_comms.h"
|
||||
|
||||
int8_t HSreadBitW(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t *data)
|
||||
{
|
||||
uint16_t b;
|
||||
uint8_t count = HSreadWord(devAddr, regAddr, &b);
|
||||
*data = b & (1 << bitNum);
|
||||
return count;
|
||||
}
|
||||
|
||||
int8_t HSreadBitsW(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t *data)
|
||||
{
|
||||
uint8_t count;
|
||||
uint16_t w;
|
||||
if ((count = HSreadWord(devAddr, regAddr, &w)) != 0) {
|
||||
uint16_t mask = ((1 << length) - 1) << (bitStart - length + 1);
|
||||
w &= mask;
|
||||
w >>= (bitStart - length + 1);
|
||||
*data = w;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
int8_t HSreadWord(uint8_t devAddr, uint8_t regAddr, uint16_t *data)
|
||||
{
|
||||
//return I2Cdev::readWord(devAddr, regAddr, data);
|
||||
|
||||
uint8_t temp;
|
||||
uint16_t temp_dat;
|
||||
// bitbang for great justice!
|
||||
*data = 0;
|
||||
pinMode(DAT, OUTPUT);
|
||||
regAddr = regAddr | (1 << 7);
|
||||
|
||||
digitalWrite(devAddr, 0); //PORTC &= ~(1<<1); //devAddr used as chip select
|
||||
for (int i = 0; i < 8; i++) {
|
||||
temp = ((regAddr & (0x80 >> i)) != 0);
|
||||
digitalWrite(CLK, 0); //PORTC &= ~(1<<5); //
|
||||
digitalWrite(DAT, temp);
|
||||
digitalWrite(CLK, 1); //PORTC |= (1<<5); //
|
||||
}
|
||||
// change direction of DAT
|
||||
pinMode(DAT, INPUT); // DDRC &= ~(1<<4); //
|
||||
for (int i = 15; i >= 0; i--) {
|
||||
digitalWrite(CLK, 0); //PORTC &= ~(1<<5); //
|
||||
digitalWrite(CLK, 1); //PORTC |= (1<<5); //
|
||||
temp_dat = digitalRead(DAT); //((PINC & (1<<4)) != 0);
|
||||
temp_dat = temp_dat << i;
|
||||
*data |= temp_dat;
|
||||
}
|
||||
digitalWrite(devAddr, 1); //PORTC |= (1<<1);// CS
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
bool HSwriteBitW(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t data)
|
||||
{
|
||||
uint16_t w;
|
||||
HSreadWord(devAddr, regAddr, &w);
|
||||
w = (data != 0) ? (w | (1 << bitNum)) : (w & ~(1 << bitNum));
|
||||
return HSwriteWord(devAddr, regAddr, w);
|
||||
}
|
||||
|
||||
bool HSwriteBitsW(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t data)
|
||||
{
|
||||
uint16_t w;
|
||||
if (HSreadWord(devAddr, regAddr, &w) != 0) {
|
||||
uint16_t mask = ((1 << length) - 1) << (bitStart - length + 1);
|
||||
data <<= (bitStart - length + 1); // shift data into correct position
|
||||
data &= mask; // zero all non-important bits in data
|
||||
w &= ~(mask); // zero all important bits in existing word
|
||||
w |= data; // combine data with existing word
|
||||
return HSwriteWord(devAddr, regAddr, w);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool HSwriteWord(uint8_t devAddr, uint8_t regAddr, uint16_t data)
|
||||
{
|
||||
//return I2Cdev::writeWord(devAddr, regAddr, data);
|
||||
|
||||
uint8_t temp_reg;
|
||||
uint16_t temp_dat;
|
||||
|
||||
//digitalWrite(13, HIGH);
|
||||
|
||||
// bitbang for great justice!
|
||||
pinMode(DAT, OUTPUT);
|
||||
regAddr = regAddr & ~(1 << 7);
|
||||
|
||||
digitalWrite(devAddr, 0); // PORTC &= ~(1<<1); //CS
|
||||
for (int i = 0; i < 8; i++) {
|
||||
temp_reg = ((regAddr & (0x80 >> i)) != 0);
|
||||
digitalWrite(CLK, 0); //PORTC &= ~(1<<5); //
|
||||
digitalWrite(DAT, regAddr & (0x80 >> i));
|
||||
digitalWrite(CLK, 1); // PORTC |= (1<<5); //
|
||||
}
|
||||
for (int i = 0; i < 16; i++) {
|
||||
temp_dat = ((data & (0x8000 >> i)) != 0);
|
||||
digitalWrite(CLK, 0); //PORTC &= ~(1<<5); //
|
||||
digitalWrite(DAT, temp_dat);
|
||||
digitalWrite(CLK, 1); // PORTC |= (1<<5); //
|
||||
}
|
||||
|
||||
digitalWrite(devAddr, 1); //PORTC |= (1<<1); //CS
|
||||
|
||||
return true;
|
||||
}
|
||||
22
src/HamShield_comms.h
Normal file
22
src/HamShield_comms.h
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
|
||||
|
||||
#ifndef _HAMSHIELD_COMMS_H_
|
||||
#define _HAMSHIELD_COMMS_H_
|
||||
|
||||
#include "Arduino.h"
|
||||
//#include "I2Cdev.h"
|
||||
|
||||
#define nSEN A1
|
||||
#define CLK A5
|
||||
#define DAT A4
|
||||
|
||||
int8_t HSreadBitW(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t *data);
|
||||
int8_t HSreadBitsW(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t *data);
|
||||
int8_t HSreadWord(uint8_t devAddr, uint8_t regAddr, uint16_t *data);
|
||||
|
||||
bool HSwriteBitW(uint8_t devAddr, uint8_t regAddr, uint8_t bitNum, uint16_t data);
|
||||
bool HSwriteBitsW(uint8_t devAddr, uint8_t regAddr, uint8_t bitStart, uint8_t length, uint16_t data);
|
||||
bool HSwriteWord(uint8_t devAddr, uint8_t regAddr, uint16_t data);
|
||||
|
||||
#endif /* _HAMSHIELD_COMMS_H_ */
|
||||
Reference in New Issue
Block a user