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
55 changes: 11 additions & 44 deletions examples/boardTest/boardTest.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
// Board tester firmare, remake by CornyjK.
/*
ArduinoLearningKitStarter (ALKS) Board tester firmware

This example is used for testing ALKS boards after manufacturing process.

Original example created by Jakub Streit (@cednik) and Jarek Páral (@JarekParal) @RoboticsBrno
Rework done by Kryštof Černý (@CornyjK) @RoboticsBrno
*/

#include <ALKS.h>
#include <DHT.h>
Expand All @@ -7,10 +14,6 @@

DHT dht(DHT_PIN, DHTTYPE);

/*int freq = 2000;
int channel = 0;
int resolution = 8;*/

unsigned long t_inc = 0;
unsigned long t_meas = 0;
uint8_t cnt = 0;
Expand All @@ -19,9 +22,7 @@ void setup() {
setupAll();
Serial.begin(DEFAULT_SERIAL_SPEED);
dht.begin();
/*ledcSetup(channel, freq, resolution);
ledcAttachPin(19, channel);*/
Serial.print("Arduino learning kit starter hardware test firmware\n");
Serial.println("ALKS hardware test firmware");
}

void loop() {
Expand Down Expand Up @@ -57,43 +58,9 @@ void loop() {
Serial.print("\n");
}

digitalWrite(L_RGB_R, digitalRead(SW3) == HIGH ? LOW : HIGH);
digitalWrite(L_RGB_R, digitalRead(SW3) == HIGH ? LOW : HIGH);
digitalWrite(L_RGB_G, digitalRead(SW2) == HIGH ? LOW : HIGH);
digitalWrite(L_RGB_B, digitalRead(SW1) == HIGH ? LOW : HIGH);

/*if (digitalRead(SW1) == LOW && digitalRead(SW2) == LOW)
{
digitalWrite(18, LOW);
Serial.write('PIEZO TEST! Alpha release, removed');
cnt = 0;
digitalWrite(L_R , LOW);
digitalWrite(L_Y , LOW);
digitalWrite(L_G , LOW);
digitalWrite(L_B , LOW);
digitalWrite(L_RGB_R, LOW);
digitalWrite(L_RGB_G, LOW);
digitalWrite(L_RGB_B, LOW);
ledcWriteTone(channel, 2000);

for (int dutyCycle = 0; dutyCycle <= 255; dutyCycle = dutyCycle + 10) {

Serial.println(dutyCycle);

ledcWrite(channel, dutyCycle);
delay(1000);
}

ledcWrite(channel, 125);

for (int freq = 255; freq < 10000; freq = freq + 250) {

Serial.println(freq);

ledcWriteTone(channel, freq);
delay(1000);
}
}
ledcWriteTone(channel, 0);*/
digitalWrite(L_RGB_B, digitalRead(SW1) == HIGH ? LOW : HIGH);

if (Serial.available())
{
Expand Down
8 changes: 8 additions & 0 deletions examples/buttonSetLed/buttonSetLed.ino
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
ALKS LED controlled example

Example with LED controlled by button.

Example created by Jarek Páral (@JarekParal) @RoboticsBrno
*/

#include <ALKS.h>
void setup() {
Serial.begin(DEFAULT_SERIAL_SPEED);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
ALKS LED example

Example with tests of all LEDs and serial communication.

Example created by Jarek Páral (@JarekParal) @RoboticsBrno
*/

#include <ALKS.h>

void setup() {
Expand Down