Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 1 addition & 1 deletion Data Logger/DataLog.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def getInfo():
a = str(a)
total = a[0:22] + " Temperature: " + str(temperature)[0:4] + " Humidity: " + str(humidity)[0:4] + " $
data.write(total)
print total
print(total)


sleep(1)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added LoRa/LoRaTracker/HAB2/Parts/HAB2.xls
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/HAB2 PCB.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1916.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1920.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1922.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1924.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1926.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1928.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1930.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1931.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1932.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1935.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1940.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1943.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1948.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1951.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/IMG_1953.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/Inverted Pips.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LoRa/LoRaTracker/HAB2/Pictures/Normal Pips.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#define programname "HAB2_UBLOX_EchoGPS_I2C"
#define programversion "V1.0"
#define dateproduced "011017"
#define aurthorname "Stuart Robinson"


/*
*******************************************************************************************************************************
Easy Build LoRaTracker Programs for Arduino

Copyright of the author Stuart Robinson - 1/10/17

http://www.LoRaTracker.uk

These programs may be used free of charge for personal, recreational and educational purposes only.

This program, or parts of it, may not be used for or in connection with any commercial purpose without the explicit permission
of the author Stuart Robinson.

The programs are supplied as is, it is up to individual to decide if the programs are suitable for the intended purpose and
free from errors.

This program reads the GPS via I2C. Stores the config settings for UBLOX GPS in Flash to save on RAM memory.

To Do:

*******************************************************************************************************************************
*/

/*
*******************************************************************************************************************************
The purpose of this program is to check that a UBLOX I2C GPS is working. Characters are read from the GPS
and sent to the Serial monitor at 115200 baud.
The program can is configured to send the commands for a UBLOX GPS that should configure it out of GLONASS mode.
*******************************************************************************************************************************
*/


#include <Arduino.h>
#include <avr/pgmspace.h>

#include "HAB2_Board_Definitions.h" //select board type here
//#include "Locator2_Board_Definitions.h" //select board type here

#include "Program_Definitions.h" //definitions for programs

const unsigned long GPS_WaitAck_mS = 2000; //number of mS to wait for an ACK response from GPS
const byte GPS_attempts = 3; //number of times the sending of GPS config will be attempted.
const byte GPS_Reply_Size = 12; //size of GPS reply buffer
boolean GPS_Config_Error;

#define GPS_ALLOW_GPGSV //we want to see the GPGSV messages
#include "UBLOX_I2CGPS.h"

void loop()
{
byte i;

Wire.beginTransmission(GPSI2CAddress);
Wire.write(0xFF);

while (1)
{
Wire.requestFrom(GPSI2CAddress, 1);
i = Wire.read();
if (i != 0xFF)
{
Serial.write(i);
}
}
}


void led_Flash(unsigned int flashes, unsigned int delaymS)
{
unsigned int index;

for (index = 1; index <= flashes; index++)
{
digitalWrite(LED1, HIGH);
delay(delaymS);
digitalWrite(LED1, LOW);
delay(delaymS);
}
}


void setup()
{
pinMode(GPSPOWER, OUTPUT); //setup pin for GPS Power Control
digitalWrite(GPSPOWER, LOW);

Serial.begin(115200); //connect at 115200 so we can read the GPS fast enough and also spit it out
Serial.println(F(programname));
Serial.println(F(programversion));
Serial.println(F(dateproduced));
Serial.println(F(aurthorname));

pinMode(LED1, OUTPUT);
led_Flash(2, 500);

Wire.begin();

GPS_On(DoGPSPowerSwitch); //this will power the GPSon
GPS_Setup();

if (!GPS_CheckNavigation()) //Check that UBLOX GPS is in Navigation model 6
{
Serial.println();
Serial.println(F("Warning GPS Error !"));
Serial.println();
led_Flash(100, 25);
}

}


Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
#define programname "HAB2_UBLOX_EchoGPS_Serial"
#define programversion "V1.0"
#define dateproduced "011017"
#define aurthorname "Stuart Robinson"


/*
*******************************************************************************************************************************
Easy Build LoRaTracker Programs for Arduino

Copyright of the author Stuart Robinson - 1/10/17

http://www.LoRaTracker.uk

These programs may be used free of charge for personal, recreational and educational purposes only.

This program, or parts of it, may not be used for or in connection with any commercial purpose without the explicit permission
of the author Stuart Robinson.

The programs are supplied as is, it is up to individual to decide if the programs are suitable for the intended purpose and
free from errors.

To Do:

*******************************************************************************************************************************
*/

/*
*******************************************************************************************************************************
The purpose of this program is to check that a UBLOX Serial GPS is working. Characters are read from the GPS
and sent to the Serial monitor at 115200 baud.
The program can is configured to send the commands for a UBLOX GPS that should configure it out of GLONASS mode.
*******************************************************************************************************************************
*/


#include <Arduino.h>
#include <avr/pgmspace.h>

//#include "HAB2_Board_Definitions.h" //select board type here
//#include "PIHTracker3_Board_Definitions.h" //select board type here
#include "Locator2_Board_Definitions.h" //select board type here

#include "Program_Definitions.h" //definitions for programs
const unsigned int GPS_Clear_DelaymS = 2000; //mS to wait after a GPS Clear command is sent
const unsigned long GPS_WaitAck_mS = 2000; //number of mS to wait for an ACK response from GPS
const byte GPS_attempts = 3; //number of times the sending of GPS config will be attempted.
const byte GPS_Reply_Size = 12; //size of GPS reply buffer
const unsigned int GPSBaud = 9600; //baud rate of GPS
boolean GPS_Config_Error;

#include <NeoSWSerial.h> //https://github.com/SlashDevin/NeoSWSerial
NeoSWSerial GPSserial(GPSRX, GPSTX); //this library is more relaible at GPS init than software serial

#define GPS_ALLOW_GPGSV //we want to see the GPGSV messages
#include "UBLOX_SerialGPS2.h"


void loop()
{
while (GPSserial.available() > 0)
Serial.write(GPSserial.read());
}


void led_Flash(unsigned int flashes, unsigned int delaymS)
{
unsigned int index;

for (index = 1; index <= flashes; index++)
{
digitalWrite(LED1, HIGH);
delay(delaymS);
digitalWrite(LED1, LOW);
delay(delaymS);
}
}


void setup()
{
pinMode(GPSPOWER, OUTPUT); //setup pin for GPS Power Control
digitalWrite(GPSPOWER, LOW);

Serial.begin(115200); //connect at 115200 so we can read the GPS fast enough and also spit it out
Serial.println(F(programname));
Serial.println(F(programversion));
Serial.println(F(dateproduced));
Serial.println(F(aurthorname));

pinMode(LED1, OUTPUT); //for Watchdog pulse input
led_Flash(2, 500);

pinMode(GPSPOWER, OUTPUT); //in case power switching components are fitted
GPS_On(DoGPSPowerSwitch); //this will power the GPSon
GPS_Setup();

if (!GPS_CheckNavigation()) //Check that UBLOX GPS is in Navigation model 6
{
Serial.println();
Serial.println(F("Warning GPS Error !"));
Serial.println();
led_Flash(100, 25);
}

}


74 changes: 74 additions & 0 deletions LoRa/LoRaTracker/HAB2/Programs/I2C_Scanner/I2C_Scanner.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// --------------------------------------
// i2c_scanner
//
// Version 1
// This program (or code that looks like it)
// can be found in many places.
// For example on the Arduino.cc forum.
// The original author is not know.
// Version 2, Juni 2012, Using Arduino 1.0.1
// Adapted to be as simple as possible by Arduino.cc user Krodal
// Version 3, Feb 26 2013
// V3 by louarnold
// Version 4, March 3, 2013, Using Arduino 1.0.3
// by Arduino.cc user Krodal.
// Changes by louarnold removed.
// Scanning addresses changed from 0...127 to 1...119,
// according to the i2c scanner by Nick Gammon
// http://www.gammon.com.au/forum/?id=10896
// Version 5, March 28, 2013
// As version 4, but address scans now to 127.
// A sensor seems to use address 120.
// Version 6, November 27, 2015.
// Added waiting for the Leonardo serial communication.
//
//
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.
//




void run_I2CScan()
{
byte error, address;
int nDevices;

Serial.println("Scanning for I2C Devices...");

nDevices = 0;
for(address = 1; address < 127; address++ )
{
// The i2c_scanner uses the return value of
// the Write.endTransmisstion to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
error = Wire.endTransmission();

if (error == 0)
{
Serial.print("I2C device found at address 0x");
if (address<16)
Serial.print("0");
Serial.println(address,HEX);

nDevices++;
}
else if (error==4)
{
Serial.print("Unknown error at address 0x");
if (address<16)
Serial.print("0");
Serial.println(address,HEX);
}
}
if (nDevices == 0)
Serial.println("No I2C devices found");
else
Serial.println();

Wire.endTransmission();
}


66 changes: 66 additions & 0 deletions LoRa/LoRaTracker/HAB2/Programs/I2C_Scanner/I2C_Scanner.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#define programname "I2C_Scanner"
#define dateproduced "2/10/2017"
#define aurthorname "Stuart Robinson"

/*
********************************************************************************************************************************

Easy Build LoRaTracker Programs for Arduino

Copyright of the author Stuart Robinson - 2/10/2017

http://www.LoRaTracker.uk

These programs may be used free of charge for personal, recreational and educational purposes only.

This program, or parts of it, may not be used for or in connection with any commercial purpose without the explicit permission
of the author Stuart Robinson.

The programs are supplied as is, it is up to individual to decide if the programs are suitable for the intended purpose and
free from errors.

This program scans each address on the I2C bus and reports if a device was found, examples.

UBLOX GPS 0x42
TC74 Temperature Sensor 0x4c
MB85RC16PNF FRAM 0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57
BME280 Sensor 0x76

********************************************************************************************************************************
*/


#include <Arduino.h>
#include <Wire.h>
#include "I2C_Scanner.h"
#include "HAB2_Board_Definitions.h"
//#include "Locator2_Board_Definitions.h"

unsigned int scancount;

void loop()
{
scancount++;
Serial.println();
Serial.print(scancount);
Serial.print(" ");
run_I2CScan();
delay(1000);
}



void setup()
{
Serial.begin(38400); //setup Serial console ouput
Serial.println(F(programname));
Serial.println(F(dateproduced));
Serial.println(F(aurthorname));
Serial.println();
Serial.flush();
pinMode(GPSPOWER, OUTPUT); //in case Ublox GPS breakout is fitted
digitalWrite(GPSPOWER, LOW);
Wire.begin();
}


Loading