This EFHW-8010 End Fed antenna was recommended so we gave it a go. The installation has the "business" end of the 130 feet antenna wire about 50 feet high
sloping down to about 8 feet with some para-cord support from an overhanging tree near
mid run to keep the antenna wire high as long as possible. The inline choke and and
matching transformer are located in the attic. This is not the optimal
setup, but the configuration was convenient for our QTH. We are very happy with the performance and the Icom IC-7300 tunes it to well to all spec'd bands.
-----
-----
Regardless of how you interpret the data the antenna is working well for our setup. 73 and see you on the bands!
-----
An OFC Dipole antenna was recently paid-forward to me. My Elmer friend let me borrow an antenna analyzer to check it out. I soon learned that the analyzer was actually put together from a kit. It is a very nice package with a sturdy case, touch screen interface, and an easy to understand user interface. Go to this page and see the AQRP 8KHz to 440MHz Vector Impedance Analyzer kit #25 for more details. It's well documented and a very slick package.
-----
Right away I wanted to play with the analyzer and decided to sweep a few 2m hand held radio antennas as a test (results below).
It's interesting how much flatter the VSWR curve is with the Nogoya NA-771 VHF/UHF aftermarket duckie. Also, I never tuned the DIY 2m Tape Measure Yagi but just following the build instructions carefully seemed to yield good results.
-----
-----
-----
-----
-----
And, just for grins we swept a DIY simple wire dipole that was cut for 20m which is only use for Rx with a SDRPlay RSP1A. Our placement for the dipole is marginal and it works equally marginal on 20m and 40m. FWIW, here are the results:
-----
When learning Morse code (referred to as CW in ham radio circles) a practice oscillator can be helpful. It lets you practice your sending without transmitting. Also, if can be useful if you are wanting to practice sending/receiving CW with another ham through a Skype channel without waiting for propagation conditions. A voice channel like Skype also allows immediate voice feedback for effective Elmering.
-----
We shelled out $10US on eBay and a few days later we got the practice oscillator pictured above in kit form from Electroresales with some good instructions. After about 30 minutes we had a working (and very loud if you crank the volume) practice oscillator. We made one small mod by adding a JST connector in parallel to the power barrel jack. This made it easier (for us anyway) to connect a 9VDC battery without having to find the right size barrel jack connector to supply the power.
-----
The result:
---- CQ CQ CQ.... In the "olden" days, Morse Code (or CW) was a requirement for a Ham Radio license. That is no longer the case, but for some reason CW seems to have a new interest with those in the hobby. After seeing more and more discussions about CW we decided to give it a try.
-----
Three things are needed:
1) An FCC Amateur Radio license; it's not hard get and it is an extremely interesting hobby.
2) A radio that can transmit/receive CW signals. We chose the QRP Labs QCX Kit.
3) You have to know Morse Code; how to send it and how to decode it.
The first two are easy. The third one not so much, but there are a host of tools and advise on the web to help. Just search google. We have only been at it 30 days and show progress, but still have a long way to go.
-----
Back to the QCX kit.... We wanted something cheap, small, and portable. We read great reviews about QRP Labs QCX Kit and decided to give it a go. After asking around about the best band for CW newbies we decided to configure for 40 meters. This page was originally going to document the build process, but really there is no need. The instructions and documentation provided with the kit are AMAZING. Really, they are! Great images, diagrams, etc. There are lots of solder joints and some toroids to hand wind, but follow the directions exactly and you will be fine.
-----
Here is the whole enchilada in a niffy 3D printed case purchased from W4KHZ / Mike. At $25 shipped it is a great value.
-----
And... a low cost transceiver is of no use without a low cost antenna. We had spare long runs of common speaker wire and hand cut a dipole for 7.050MHz (a common frequency for 40m CW). We must have been using calibrated wire cutters. Below is the initial SWR sweep from 7.000MHz to 7.100MHz.
-----
All in all we are very pleased. Now back to CW practice. Thanks for the visit and maybe we will hook up on 40m.
-----
From time to time the International Space Station (ISS) will activate their Slow Scan Television (SSTV) transmitter. April 12, 2018 was one of those times as the Russian crew commemorated Cosmonautics Day. Getting a SSTV image from the ISS is kind of like getting a FAX sent to you from a spaceship. In the case of the captured image above the ISS was transmitting an audio signal to Earth on a frequency 145.800MHz with 25 Watts. The signal is strong and lets anyone with some basic equipment receive and decode the image.
----
For this capture we used:
- The Heavens Above website to predict the ISS pass.
- A Kenwood TH-D72A to receive the signal (could be a low cost ham radio or SDR).
- A DIY Yagi antenna (the signal was so strong this was probably not required).
- A small recorder to save the audio received.
- Software to decode the recorded audio into an image. We used RX-SSTV.
----
The whole process takes some planning and setup, but it's not that hard and it was rewarding to see the result. If you want to hear what our image "sounds like" or test your decode SW then play this:
-----
The SSTV passes are scheduled from time to time. Here are some of our captures:
-----
Note: As presented this project requires a FCC Amateur Radio license. Amateur Radio is about experimentation. Even still you must be versed in the band plan and stay away from local repeater stations, stay in accordance to FCC Amateur Radio rules such as 97.201(a), 97.201(b), 97.213(a), 97.215, 97.3(a)(7), and likely a few others. Even after following all those rules, nobody likes to hear a bunch on random DTMF tones so keep your transmissions short and infrequent.
-----
Most Amateur (or ham) radio operators have wondered how or if their signal is getting received. After getting a YES/NO answer they may want to decrease power, try a different antenna set up, or change location. The challenge with this can be a willing participant on the receive side that has promised to remain perfectly still and listen for hours. If you have a friend or XYL willing to do that then consider yourself fortunate. For all the others there is this project.
-----
The rig is pretty straight forward and explained in the image above.
- From the field a DTMF tone is transmitted on a frequency that "the shack" is tuned to.
- If the radio in the shack hears the DTMF tone it is decoded with this module.
- Code running on an ESP8266 turns the decoded tone "to English" and sends a SMS text message via IFTTT.
- If the shack received everything you will get a confirming QSL SMS on your smartphone.
-----
It's all quick and simple. It takes only a 250 mSec or so transmission time and a delay of maybe 2 seconds to get the confirming QSL SMS. The short video below gives a good explanation:
-----
Want to build your own? No problem.
1st: Get a FCC Amateur Radio license; it's not hard and is an extremely interesting hobby.
2nd: Buy some radios (costs range from $30 to infinity).
3rd: Buy the DTMF module and an ESP8266.
4th: Set up a free IFTTT account for the SMS texting.
5th: Hook it all up as shown in the image at the top of this page.
6th: Load the source code below into your ESP8266 (you will need the Arduino IDE).
7th: Be respectful of the rules and test away.
-----
Before showing the ESP8266 source code here's a short video using 5 of the 8 channels on the Tektronix MSO5 (which is bad ass!!!) to monitor the signals coming off the DTMF module.
-----
The (short/simple) ESP8266 source code is below. If you duplicate the project or this motivates you to get your FCC Amateur Radio license let us know:
-----
/*
* HamControl
* MARCH2018
* WhiskeyTangoHotel.Com
*
* This project as described requires a FCC Amateur Radio License!!!!!!
* Be aware of all FCC license and regulation retrictions before use!!!
* Follow local band plan and Federal regulations!!!!!!!!!!!!!!!!!!!!!!
* Go ahead and get your license. It's a fun hobby. See: http://www.arrl.org/getting-licensed
*
* HamControl:
* Use DTMF Tones to control ESP8266 via ham radio.
* Primary application was to confirm simplex signal Tx/Rx for antenna testing.
* When a DTFM is detected a SMS is sent your cell phone for field comfirmation.
*
* For DTMF DeCode: SMAKN® XD-61 MT8870 (~$10 USD)
* NOTE: For Baofeng set volume to ~80%
*
* uC setting for Ardunio IDE (ESP8266 with WiFI)
* NoderMCU 1.0 (ESP-12E Module), 80MHz, 921600, 4M (3M SPIFFS)
*
*/
// For the Wireless
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
// WiFi Connection Information
const char* ssid = "Your-SSID-Here"; // PRIVATE: Enter your personal setup information.
const char* password = "Your-WiFi-PW-Here"; // PRIVATE: Enter your personal setup information.
ESP8266WebServer server(80);
// IFTTT Information for WebHook widget
String MAKER_SECRET_KEY = "Your-IFTTT-PrivateKey-Here"; // PRIVATE: Enter your personal setup information. Your IFTTT Webhook key here
String TRIGGER_NAME_SMS = "HamControl_SMS"; // this is the Maker IFTTT trigger name to send SMS if a DTFM tone is recieved.
const char* host = "maker.ifttt.com";
String url_SMS; // url that gets built for the IFTTT Webhook sending SMS DTMF recieved confirmation.
String DTMF_String; // used to covert numbers and *,#,A,B,C,D tones to a string value.
// Define and set up some variables
int DTMF; // What key press was sent by the ham radio.
// Define ESP8266 pins
const int led = 2; // Blue on board LED is on PIN-D4 (GPIO2) for this NoderMCU 1.0 ESP8266. Blink it between reads
// Define pins from the DTMF Decoder to the ESP8266 GPIO
const int Q1 = 12; // PIN-D6 SILK SCREEN LABEL
const int Q2 = 13; // PIN-D7 SILK SCREEN LABEL
const int Q3 = 15; // PIN-D8 SILK SCREEN LABEL
const int Q4 = 5; // PIN-D1 SILK SCREEN LABEL
const int STQ = 4; // PIN-D2 SILK SCREEN LABEL
// Program control variables
int logging = 1; // If 1 then send SMS. Any other value (0) turns it off. For debug, typically would be set = 1
void setup(void){ // This setup code is run once.
pinMode(led, OUTPUT); // set up the onboard Blue LED pin as an output.
pinMode(Q1, INPUT); // Q1-4 are the output signals from the DTFM IC
pinMode(Q2, INPUT); // that are feed into and read by the ESP8266
pinMode(Q3, INPUT);
pinMode(Q4, INPUT);
pinMode(STQ, INPUT); // STQ is high when DTFM tone is detected
Serial.begin(115200); // turn on the serial monitor for debug
// Is the WiFi working?
WiFi.begin(ssid, password);
Serial.println("");
// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
Serial.print("Trying to connect to ");
Serial.print(ssid);
Serial.print(" on ");
Serial.print(WiFi.localIP());
for (int x = 0; x < 20; x++) { //
digitalWrite(led, !digitalRead(led)); // toggle state of the on board blue LED. Shows program is trying to WiFi connect
//Serial.println("Server Start blink loop....");
delay(50);
} // endfor WiFi blink connect
}
Serial.print("Connected to ");
Serial.println(ssid);
Serial.println(WiFi.localIP());
if (MDNS.begin("esp8266")) {
Serial.println("MDNS responder started");
Serial.println(" ");
}
// Use WiFiClient class to create TCP connections for WiFi logging
WiFiClient client;
const int httpPort = 80;
if (!client.connect(host, httpPort)) {
Serial.println("connection failed"); // Boo!!!
return;
}
server.begin();
Serial.println("HTTP server started"); // Woo Hoo!!!
Serial.println(" ");
Serial.println("Entering HamControl main loop. ");
Serial.println("Waiting for DTMF... ");
Serial.println("-------------------------------------");
}
void loop(void){ // Loop this code section until hell freezes over
// The blue onboard LED will blink between to show prog is 'running'.
digitalWrite(led, !digitalRead(led)); // toggle state of the on board blue LED.
if (digitalRead(STQ) == HIGH) { // If it HIGH then DTFM detected. Let's get to work.
Serial.println("DTMF Detected!!!");
DTMF_String = "Could_not_decode_DTFM!"; // Should be overwritten below, but just in case Mr Murphry shows up...
// Convert the four bit (Q1-Q4 read) to decimal values 1-9 to match the button pushed
// 0=10, *=11, #=12, A=13, B=14, C=15, D=0
DTMF = (digitalRead(Q4) * 8) + (digitalRead(Q3) * 4) + (digitalRead(Q2) * 2) + (digitalRead(Q1) * 1);
DTMF_String = String(DTMF);
if (DTMF == 10) {
DTMF_String = "0";
}
if (DTMF == 11) {
DTMF_String = "*";
}
if (DTMF == 12) {
DTMF_String = "HASH";
}
if (DTMF == 13) {
DTMF_String = "A";
}
if (DTMF == 14) {
DTMF_String = "B";
}
if (DTMF == 15) {
DTMF_String = "C";
}
if (DTMF == 0) {
DTMF_String = "D";
}
Serial.println("Key pressed: " + DTMF_String);
if (logging == 1) { // is SMS logging turned on?
// Set up IFTTT Webhook Channel to send the SMS.
// Use WiFiClient class to create TCP connections for IFTT SMS
WiFiClient client;
const int httpPort = 80;
if (!client.connect(host, httpPort)) {
Serial.println("connection failed");
return;
}
// Build the IFTTT SMS url
url_SMS = "https://maker.ifttt.com/trigger/" + TRIGGER_NAME_SMS + "/with/key/" + MAKER_SECRET_KEY+ "?value1=" + DTMF_String;
Serial.println(" ");
Serial.println("SMS payload to IFTTT.");
Serial.println(url_SMS);
client.print(String("POST ") + url_SMS + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"Connection: close\r\n\r\n");
Serial.println(" ");
Serial.println("Logging is ON.");
delay(1000); // pause for webservices and to prevent double tap
// and fast blink the blue onboard LED to show DTMF was recognized
for (int x = 0; x < 100; x++) {
digitalWrite(led, !digitalRead(led)); // toggle state of the on board blue LED
delay(50);
} // endfor DFTM delay/blink
} else {
Serial.println("Logging is OFF.");
Serial.println(" ");
} // endif/else logging
Serial.println("-------------------------------------");
Serial.println("Waiting for DTMF... ");
} //Endif STQ High?
delay(250); // Delay for flashing on board BLUE program running status LED
-----
It's done everyday, but (as they say) you never forget your first. The 'cube' above is Satellite A0-91. This little guy has a VHF/UHF amateur radio repeater on board which means it is available for use if you hold a FCC Technician license.
It's not overly difficult, but it is a good challenge. Today we were able to get a contact for the first time. It's pretty satisfying using a $50'ish handheld radio to communicate via space.
-----
Here is the audio:
The summary:
- get a Raspberry PI
- get a General Class FCC license (if you don't have one)
- buy the WsprryPI hat
- install the SW from GitHub
- be amazed by your contact report (map above and video below) without ever talking to anyone.
----- More detail:
There has been an amateur radio (ham) curiosity rattling around in my brain, but the urge was not enough to act on it. Then I heard about WSPR on the Embedded.fm podcast. WSPR stands for Weak Signal Propagation Reporter. Basically there are WSPR beacons that transmit with very low power (100mW for my rig) to WSPR receivers located around the world. If a WSPR receiver picks up your WSPR beacon signal the communication is logged. It's used to help study radio frequency propagation and it's fun. Take a look at the propagation map on WSPRnet.org. It is amazing the distances these very low power HF signals travel.
---
We then learned that to transmit as a WSPR beacon on the HF bands a General Class FCC Amateur Radio license was needed. That provided the motivation to get our "ticket". The sample tests did not seem difficult and we were pleased to find that learning Morse Code (CW) was no longer required. Fast forward a few weeks and we are graciously entrusted by our Federal Government to be an amateur radio operator. Cost: $15. So now what....
----
First we did what all new hams do and buy a cheap HT radio, but that's not important here....
-----
Back to the WSPR beacon... There are many WSPR protocol transmitters that can be purchased. We went with the 20m WSPR-Pi kit from TARP.org.
The TARP.org kit was chosen for a few reasons: 1st) we understand the RasPI and had a spare. 2nd) the 'kit' plugs right onto the RasPI GPIOs. 3rd) it seemed really simple.
-----
And, really simple it was (kinda). We downloaded the software that runs the WSPR transmitter from GitHub and.... it didn't compile. No worries because after installing a new, fresh, clean OS on the RasPI everything installed as planned. Next step was to screw on two ~18 feet wires into the transmitter antenna terminals and throw those wires on the floor. The README gave us what was needed to run the software from the terminal command line. Five minutes later and we already had several transmission confirmations. Beer was consumed!!!
A comment of CAUTION: Don't route the antenna or wires to the antenna directly over the RasPI. When the WSPR beacon transmits the RF interference can cause a reboot. Moving the position of the antenna should corrrect.
-----
Here is a 24 hour animation of our contacts:
-----
And here is the WSPR beacon signal as it appears on our Tektronix MSO5 scope:
-----
In our short exposure we have gotten a lot more from the ham radio hobby than expected. Long "ragchews" probably will not be our thing, but there are so many other facets. For example, we're currently building a Yagi antenna with the goal of communicating (briefly) through a passing satellite or capturing a SSTV image from the ISS. Anyone that has been curious about the hobby should take another look. There are many other things to explore (beacons, digital modes, telemetry, satellites, moon-bounce, meteor scatter, remote control, APRS, JT65, fox hunting, amateur TV, etc.) than talking on the air and that makes it interesting.
-----
In our modern world, high bright LEDs can be purchased cheaply to provide low current draw auxiliary lighting to any vehicle. Then it is only a simple matter of connecting the LED to 12VDC and head down the road enjoying your new found wattage. However, there is no fun in the easy way. Follow the instructions below to build your own custom high bright LED driver.
-----
OBJECTIVE: A high bright LED for installation on a Kawasaki KLR650 motorcycle with six programmable modes:
-----
To keep the project simple, an Ardunio Nano is used to control the Gate Voltage (Vgs) of a MOSFET. When Vgs is HIGH the MOSFET switches on and the high bright LED turns on. By using Pulse Width Modulation (PWM) on the Arduino the brightness of the high bright LED can be easily controlled.
-----
You will need the parts in the schematic. All are readily available from Amazon or a host of electronic parts distributors. Of course, the 12VDC power source is provided by the vehicle.
---
On the bench the rig will look and function something like this:
----
The schematic leaves out some details that could be helpful. To control the MODE selection and the STROBE effect we used a handlebar mounted switch. I also drilled a small hole to mount the STATUS LED into the handlebar switch. With coded flashes, the STATUS LED lets the rider know the current mode of the rig. Pressing the GREEN button selects the next mode. Move the turn signal switch to "R" to turn on the STROBE effect. The image below provides some real world connection details. If you get the same handlebar switch we recommend buzzing out the wires first to verify them because the unit came with no diagram and low cost manufactures often change these details.
----
After you use the Arduino IDE to download the source code provided below into your Ardunio Nano you will need to mount to high bright LED. We got a mounting bracket from eBay. In the end it came out pretty nice.
-----
Here is a video of the rig running through all the modes. The quick strobe at the beginning is a wake up self test. The high bright LED swamps out the camera light sensor and doesn't provide a good indication of the actual effect. One note: It turns out Apple has a patent on the Breathing LED pattern (well, for a sleep indicator anyway). Use the "breathing LED" portion of the code with caution or, I guess, risk a cease and desist order.
-----
Here is the Arduino source code for the rig. Good luck!
//------------------------------------------------------------------------
/*
KLR650 Aux LED Driver
July 2019
WhiskeyTangoHotel.Com
Ardunio Nano (should work with other Arduinos)
Program controls a IRF510 MOSFET to drive a High Bright LED Array
(I recommend a heat sink on the MOSFET, but it should be fine without it)
A button switch selects between modes
A switch sets the LED to fast strobe mode
*/
int Number_of_Modes = 4; // Needed for program control.
int LED_Mode = 1; // LED_Mode sets the startup condition and is changed with button pushes in the main loop.
int Status_LED = 3; // PWM output pin for the LED status light.
int FET_Drive = 5; // PWM output pin to drive the gate on the MOSFET.
int mode_buttonPin = 4; // Mode changing push button (wired to GND via 10K)
int strobe_buttonPin = 8; // Mode changing push button (wired to GND via 10K)
boolean buttonState = LOW; // for the mode_ and strobe_ detect
// Percent brightness of the 3 modes. Example: 35% = .35, 100% = 1.00
// LED_Mode = 0 is OFF
float MODE1_Bright = .20;
float MODE2_Bright = .50;
// LED_Mode = 3 is FULL Bright: digitalWrite(Status_LED, 255); // 255 turns LED FULL BRIGHT
// LED_Mode = 4 is Breath
int Breath_Rate = 15; //Higher is faster
int Breath_Max_Bright = 170;
int Breath_Min_Bright = 20;
int Flash_delay = 50; // sets delay for strobe mode and self test (50 is a good start)
void setup()
{
// Serial commands are for debugging
//Serial.begin(9600);
//Serial.print(LED_Mode);
//Serial.println();
pinMode(Status_LED, OUTPUT); // sets the digital pins as output
pinMode(FET_Drive, OUTPUT);
pinMode(mode_buttonPin, INPUT); // initialize the mode pushbutton pin as an input. If HIGH change modes
pinMode(strobe_buttonPin, INPUT); // if HIGH quick stobe/flash mode
digitalWrite(Status_LED, 0); // 0 turns the LED OFF
digitalWrite(FET_Drive, 0);
// Self test loop. Quick flash the status and high bright LED
for (int i = 0; i <= 4; i++) {
digitalWrite(Status_LED, 255); // 255 turns LED FULL BRIGHT
digitalWrite(FET_Drive, 255);
delay(Flash_delay);
digitalWrite(Status_LED, 0); // 0 turns the LED OFF
digitalWrite(FET_Drive, 0);
delay(Flash_delay);
} // endSelf Test Loop
} //end Setup
void stobe_on_button () { // strobe/flash the LED when HIGH
int buttonState = digitalRead(strobe_buttonPin); // check if the pushbutton is pressed.
if (buttonState == HIGH) { // button is pressed, strobe the LEDs
Serial.println(buttonState);
digitalWrite(Status_LED, 255); // 255 turns LED FULL BRIGHT
digitalWrite(FET_Drive, 255);
delay(Flash_delay);
digitalWrite(Status_LED, 0); // 0 turns the LED OFF
digitalWrite(FET_Drive, 0);
delay(Flash_delay);
stobe_on_button (); // check to see if strobe button is still pressed HIGH
} // endif strobe_button HIGH
} // end of strobe_button function
void mode_change_button() { // function to dectect the mode_buttonPin press to change modes (increment the state machine)
int buttonState = digitalRead(mode_buttonPin); // check if the pushbutton is pressed.
if (buttonState == HIGH) { // button is pressed, advance to next LED_Mode
digitalWrite(Status_LED, 255); // 255 turns LED FULL BRIGHT
for (int x = 0; x < 25; x++) { // Quick flash the Status LED to confirm button press.
digitalWrite(Status_LED, !digitalRead(Status_LED)); // toggle state of the on board blue LED. Shows program is running
delay(100);
} // endfor quick toogle Blue LED
if (LED_Mode >= Number_of_Modes) { // reset state machine to zer0 to recycle LED_Modes
LED_Mode = 0;
}
else {
LED_Mode = LED_Mode + 1;
}
if (digitalRead(strobe_buttonPin) == HIGH) {
LED_Mode = 0; // this is a fast cycle to OFF. The flash button AND the mode button are HIGH
}
} // endif state_mode button pressed
} // end of mode_change_button function
// LED_Mode - OFF, no lights
if (LED_Mode == 0) {
analogWrite(Status_LED, 0); // 0 turns the LED OFF
analogWrite(FET_Drive, 0); // 0 turns the MOSFET
} // endif LED_Mode = 0
// LED_Mode - Percent Brightness
if (LED_Mode == 1) {
analogWrite(FET_Drive, (255 * MODE1_Bright)); // Percent Brightness = MODE1_Bright
for (int x = 0; x < LED_Mode; x++) { // Flash rate Status LED to match mode
digitalWrite(Status_LED, 255); // 255 turns LED FULL BRIGHT
delay(100); // endfor quick toogle Blue LED
digitalWrite(Status_LED, 0); // 0 turns LED OFF
delay(100); // endfor quick toogle Blue LED
} //for match Status_LED with mode
delay(600);
} // endif LED_Mode = 1
// LED_Mode - Percent Brightness
if (LED_Mode == 2) {
analogWrite(FET_Drive, (255 * MODE2_Bright)); // Percent Brightness = MODE2_Bright
for (int x = 0; x < LED_Mode; x++) { // Flash rate Status LED to match mode
digitalWrite(Status_LED, 255); // 255 turns LED FULL BRIGHT
delay(100); // endfor quick toogle Blue LED
digitalWrite(Status_LED, 0); // 0 turns LED OFF
delay(100); // endfor quick toogle Blue LED
} //for match Status_LED with mode
delay(600);
} // endif LED_Mode = 2
// LED_Mode - Full Brightness
if (LED_Mode == 3) {
digitalWrite(FET_Drive, 255); // FULL BRIGHT
for (int x = 0; x < LED_Mode; x++) { // Flash rate Status LED to match mode
digitalWrite(Status_LED, 255); // 255 turns LED FULL BRIGHT
delay(100); // endfor quick toogle Blue LED
digitalWrite(Status_LED, 0); // 0 turns LED OFF
delay(100); // endfor quick toogle Blue LED
} //for match Status_LED with mode
delay(600);
} // endif LED_Mode = 3
// LED_Mode - LED BREATHING
if (LED_Mode == 4) {
// Ramp up the brighness of the LED
for (int i = Breath_Min_Bright; i <= Breath_Max_Bright; i++) {
analogWrite(Status_LED, i);
analogWrite(FET_Drive, i);
float Breath_Delay = (exp(sin(i/2000.0*PI*10)) - 0.36787944)*108.0;
delay(Breath_Delay/Breath_Rate);
if (buttonState == HIGH) { // check if the pushbutton is pressed.
i = Breath_Max_Bright;
}
}
mode_change_button(); // check to see if mode_change button is pressed
stobe_on_button (); // check to see if strobe_button is pressed
// Ramp down the brightness of the LED
for (int i = Breath_Max_Bright; i >= Breath_Min_Bright; i--) {
analogWrite(Status_LED, i);
analogWrite(FET_Drive, i);
float Breath_Delay = (exp(sin(i/2000.0*PI*10)) - 0.36787944)*108.0;
delay(Breath_Delay/Breath_Rate);
if (buttonState == HIGH) { // check if the pushbutton is pressed.
i = Breath_Min_Bright;
}
}
} // endif LED_Mode 4
mode_change_button(); // check to see if mode_change button is pressed
stobe_on_button (); // check to see if strobe_button is pressed