This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Author: @justiceamoh and Nathan Seidle | |
Created: November 19th, 2019 | |
License: MIT. See SparkFun Arduino Apollo3 Project for more information | |
This example demonstrates how to read audio data and output | |
it to a WAV file. This sektch outputs raw serial, an accompanying | |
python script visualizes and coverts the raw data to a WAV file. | |
Note: Audio samples are generated fast enough that we need to output | |
serial at 500kbps. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Author: Nathan Seidle | |
Created: July 24, 2019 | |
License: MIT. See SparkFun Arduino Apollo3 Project for more information | |
This example demonstrates how to use the PDM microphone on Artemis boards. | |
*/ | |
#define ARM_MATH_CM4 | |
#include <arm_math.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> // Must include Wire library for I2C | |
#include <SparkFun_MMA8452Q.h> | |
MMA8452Q accel(0x1D); // Initialize the MMA8452Q with an I2C address of 0x1C (SA0=0) | |
void setup() | |
{ | |
Serial.begin(115200); | |
Serial.println("MMA8452Q Test Code!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Initialize the Serial port | |
bool Laser::begin(Stream &serialPort) | |
{ | |
_laserSerial = &serialPort; //Grab which port the user wants us to use | |
//_laserSerial->begin(); //Stream has no .begin() so the user has to do a whateverSerial.begin(xxxx); from setup() | |
} | |
//Send a command to the laser | |
void Laser::sendCommand(String command) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is just a snippet. The full files are here: https://github.com/sparkfun/Genericized_Library_Examples | |
#include "Laser.h" //The example lib | |
Laser myLaser; //Instantiate an instance of the class | |
void setup() | |
{ | |
Serial.begin(9600); //We have to start the serial port before we call begin() | |
myLaser.begin(Serial); //Pass the port object to the library | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Initialize the I2C port | |
bool Memory::begin(TwoWire &wirePort) | |
{ | |
_i2cPort = &wirePort; //Grab which port the user wants us to use | |
_i2cPort->begin(); | |
} | |
//Store a piece of data (thing) into a given address (place) | |
void Memory::writeValue(uint16_t place, uint8_t thing) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is just a snippet. See the full files here: https://github.com/sparkfun/Genericized_Library_Examples | |
#include "Memory.h" //The example lib | |
Memory myStorage; //Instantiate an instance of the class | |
void setup() | |
{ | |
Serial.begin(9600); | |
myStorage.begin(Wire); //Pass the I2C Port to the library | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Title | |
Intelligent Traffic Control System (ITCS) | |
# Picture | |
media: http://www.deviantsart.com/8eadk4.jpg | |
# Objective | |
PROJECT AIM: | |
The aim of this project is to monitor and report on the traffic light in the country which is one of the cause of traffic in the country since most of them are not functioning and they are also been monitored manually. Our project initiative aims to solve the problem of manual monitoring. Our project will monitor traffic lights by the use of sensors and report to MTTU whenever a traffic light breaks down by triggering the sensors to pinpoint the location of where the traffic light is and send out an SMS alert to MTTU for them to know there is a traffic light breaks down. We believe this is going to help the MTTU monitor traffic light effectively and attend to them within the shortest possible time. We also want to use solar panels as secondary power and backup for the traffic lights ensuring that they are operational always. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
9-23-2012 | |
Spark Fun Electronics | |
Nathan Seidle | |
This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). | |
Serial7Segment is an open source seven segment display. | |
This is example code that shows how to display basic numbers on the display. | |
Note: This code expects the display to be listening at 9600bps. If your display is not at 9600bps, you can |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1-14-2013 | |
Spark Fun Electronics | |
Nathan Seidle | |
This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license). | |
When the ATtiny senses water between two pins, go crazy. Make noise, blink LED. | |
Created to replace the water sensor in my Nauticam 17401 underwater enclosure. The original board |