Skip to content

Commit

Permalink
Updating README, adding Integration and AX25 Packet sketches
Browse files Browse the repository at this point in the history
  • Loading branch information
sgithens committed Apr 25, 2012
1 parent 38d9752 commit a6b90dd
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 0 deletions.
104 changes: 104 additions & 0 deletions Integration/Integration.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/*
* Pins:
* 0,1: Hardware Serial used by AX.25 Chip
* 2,3: SoftwareSerial used by GPS
* 4: Power for GPS
*/

#include "Arduino.h"
#include "SoftwareSerial.h"

// Use pins 2 and 3 to talk to the GPS. 2 is the TX pin, 3 is the RX pin
SoftwareSerial mySerial = SoftwareSerial(2, 3);

// Use pin 4 to control power to the GPS
#define powerpin 4

// Set the GPSRATE to the baud rate of the GPS module. Most are 4800
// but some are 38400 or other. Check the datasheet!
#define GPSRATE 4800

// The buffer size that will hold a GPS sentence. They tend to be 80 characters long
// so 90 is plenty.
#define BUFFSIZ 90 // plenty big

// gps global variables
char buffer[BUFFSIZ]; // string buffer for the sentence
char *parseptr; // a character pointer for parsing
char buffidx; // an indexer into the buffer

// ax.25 global variables
int turnTXOnPin = 12;


void setup()
{
/*
* GPS Setup
*/
if (powerpin) {
pinMode(powerpin, OUTPUT);
}

// Use the pin 13 LED as an indicator
pinMode(13, OUTPUT);

// connect to the GPS at the desired rate
mySerial.begin(GPSRATE);

digitalWrite(powerpin, LOW); // pull low to turn on!

/*
* AX.25 Transmitter Setup
*/
pinMode(turnTXOnPin, INPUT);
digitalWrite(turnTXOnPin, HIGH);
Serial.begin(4800); //OPEN SERIAL LINE AT 4800
delay(3);
Serial.print("MKC9SPN\r\n"); //SET YOUR CALLSIGN HERE, HERE YOU SEE W1AW
delay(10);
Serial.print("PWIDE1-1,WIDE2-1\r\n"); //SET DIGIPATH HERE
delay(10);
/* Serial.print("L150\r\n"); */
delay(10);
Serial.print("!This is RadioShield test message #\r\n");
delay(8000);
// Serial.print("@This is RadioShield test message #\r\n");
// delay(4000);
}

/*
* Readline method used for GPS code. Reads a GPS line into
* global variable buffer;
*/
void readline(void) {
char c;

buffidx = 0; // start at begninning
while (1) {
c=mySerial.read();
if (c == -1)
continue;
if (c == '\n')
continue;
if ((buffidx == BUFFSIZ-1) || (c == '\r')) {
buffer[buffidx] = 0;
return;
}
buffer[buffidx++]= c;
}
}

void loop()
{
uint32_t tmp;

// Serial.print("Read: ");
readline();

Serial.print("!");
Serial.print(buffer);
Serial.print("\r\n");

delay(8000);
}
12 changes: 12 additions & 0 deletions Integration/Integration.ino~
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Pins:
* 0,1: Hardware Serial used by AX.25 Chip
* 2,3: SoftwareSerial used by GPS
*/

#include "Arduino.h"
#include "SoftwareSerial.h"

SoftwareSerial mySerial = SoftwareSerial(2, 3);


8 changes: 8 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,23 @@ SD Card Logger - CardInfo contains a sketch for listing the files on
GPS Module - GPStest_RMC contains a sketch for parsing the raw data
from the GPS and printing it out to the serial port.

Documentation: http://www.ladyada.net/make/gpsshield/index.html

Transmitter - The MorseCode directory and sketch contains a standalone
example for sending audio over the transmitter on channel 144.390

Programming the AX.25 Shield:
http://wiki.argentdata.com/index.php?title=Radio_Shield#Display_Incoming_Packets
Code for the AX.25 Chip: http://www.argentdata.com/support/source-code.html

Xastir/Soundmodem -
etc/ax25/soundmodem.conf is a working soundmodem conf that can be copied
to the system etc.

Steps to get soundmodem/xastir working after copying the soundmodem.conf over.

0. Run: sudo soundmodem

1. Run: sudo soundmodemconfig
2. Click on 'Channel 0' and then Diagnostics->Modem
This should allow you to see packets coming in.
Expand Down
34 changes: 34 additions & 0 deletions ax25packet/ax25packet.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
int counter = 1;


int turnTXOnPin = 12;

void setup()
{
pinMode(turnTXOnPin, INPUT);
digitalWrite(turnTXOnPin, HIGH);
Serial.begin(4800); //OPEN SERIAL LINE AT 4800
delay(3);
Serial.print("MW1AW\r\n"); //SET YOUR CALLSIGN HERE, HERE YOU SEE W1AW
delay(10);
Serial.print("PWIDE1-1,WIDE2-1\r\n"); //SET DIGIPATH HERE
delay(10);
Serial.print("L150\r\n");
delay(10);
}

void loop()
{
Serial.print("!>This is RadioShield test message #"); //BEGIN MESSAGE BUT DON'T SEND YET...
Serial.print(counter); // ...CONCATENATE VALUE OF count TO OUTPUT...
Serial.print("\r\n"); // ...SEND CR/LF TO COMPLETE AND TRANSMIT PACKET.
counter++;
delay(5000); //30,000ms = 30sec

// Serial.print("@>This is RadioShield test message #"); //BEGIN MESSAGE BUT DON'T SEND YET...
// Serial.print(counter); // ...CONCATENATE VALUE OF count TO OUTPUT...
// Serial.print("\r\n"); // ...SEND CR/LF TO COMPLETE AND TRANSMIT PACKET.
// counter++;
// delay(30000); //30,000ms = 30sec
}

28 changes: 28 additions & 0 deletions ax25packet/ax25packet.ino~
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
int counter = 1;

void setup()
{
Serial.begin(4800); //OPEN SERIAL LINE AT 4800
delay(3);
Serial.print("MKC9SPN\r\n"); //SET YOUR CALLSIGN HERE, HERE YOU SEE W1AW
delay(10);
Serial.print("PWIDE1-1,WIDE2-1\r\n"); //SET DIGIPATH HERE
delay(10);
//Serial.print("L255\r\n");
//Serial.print("D150\r\n");
// Serial.print("L250");
//Serial.print("!fm KC9SPN-9 to SYUU6Q-0 via KB9LTH-10,WIDE2-2 UIv pid=F0`rYrl\r>/]\"6`}=");
//Serial.print("\r\n"); // ...SEND CR/LF TO COMPLETE AND TRANSMIT PACKET.
}

void loop()
{
Serial.print("!> Hello there #");
Serial.print("\r\n"); // ...SEND CR/LF TO COMPLETE AND TRANSMIT PACKET.
delay(5000);
// Serial.print("!>This is RadioShield test message #"); //BEGIN MESSAGE BUT DON'T SEND YET...
// Serial.print(counter); // ...CONCATENATE VALUE OF count TO OUTPUT...
// Serial.print("\r\n"); // ...SEND CR/LF TO COMPLETE AND TRANSMIT PACKET.
// counter++;
// delay(10000); //30,000ms = 30sec
}

0 comments on commit a6b90dd

Please sign in to comment.