Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Vulcainreo/DVID
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptax committed Jun 20, 2019
2 parents 57522bf + cf9e7c4 commit 861a745
Show file tree
Hide file tree
Showing 26 changed files with 7,150 additions and 2,073 deletions.
Binary file modified build/bin/wifi/ai-cloud-inside.bin
Binary file not shown.
Binary file added build/bin/wifi/farylink_1.0.0.2.bin
Binary file not shown.
3 changes: 2 additions & 1 deletion test/testBoard/testBoard.ino
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ void setup()
wifi.begin(115200);

wifi.println("AT");
printScreen(wifi.readString(),"");
wifi.println("AT+CWMODE=2");
wifi.println("AT+CWSAP_CUR=\"DVID-TESTING\",\"aaa\",5,0");
}

void loop() {}
94 changes: 94 additions & 0 deletions trainings/firmware/defaultPassword/defaultPassword.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Fonts/FreeSans9pt7b.h>


#define DVID_logo_width 128
#define DVID_logo_height 64

#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels

// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(OLED_RESET);

String password = "password";
String message = "R5azzbhz4bf23isccbts1111";
String currentPassword = "";
bool finished = false;
String rx = "";
bool first = true;

void printScreen(String text, String progress) {

// Clear the buffer.
display.clearDisplay();

display.setCursor(0,0);
// xxxxxxxxxxxxxxxxx xxxx
display.println("T04 Default.Pass."+progress+"%"); //first line - only 21 chars
display.drawLine(0,7,128,7,WHITE);

display.setCursor(0,10);
display.println(text);

display.display();
}

void setup()
{
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}

currentPassword = "";

display.begin(SSD1306_SWITCHCAPVCC, 0x3C);

// Display Text
display.clearDisplay();

display.setTextSize(1); // Normal 1:1 pixel scale
display.setTextColor(WHITE); // Draw white text
display.cp437(true); // Use full 256 char 'Code Page 437' font

String m = String(message[0])+String(message[2])+String(message[5])+String(message[9])+String(message[13])+String(message[18])+String(message[19]);
printScreen("I have confidential message. Pass ?", " 0");

while(!finished) {

if (currentPassword != password) {

if (!first) {
printScreen("Wrong password\nTry again", " 50");
currentPassword = "";
}

if (Serial.available() > 0) {

rx = Serial.readString();
currentPassword = currentPassword + rx;
currentPassword.trim();
printScreen("Pass : "+currentPassword, " 50");
first = false;
Serial.println("ko");
delay(2000);
}
}
else
{
Serial.println("ok");
printScreen("Well done! Message : "+m,"100");
finished = true;
}


}

}

void loop() {}
Loading

0 comments on commit 861a745

Please sign in to comment.