julisa99 / lovebox Goto Github PK
View Code? Open in Web Editor NEWDIY project to lasercut a lovebox on your own (see https://en.lovebox.love/), which would cost almost $100.
Home Page: https://lisaih.de/Lovebox/
License: MIT License
DIY project to lasercut a lovebox on your own (see https://en.lovebox.love/), which would cost almost $100.
Home Page: https://lisaih.de/Lovebox/
License: MIT License
Somehow all four SVGs seem broken. The browser doesn't render them if you navigate to https://github.com/julisa99/Lovebox/tree/master/lasercut_files. Then I cloned the repo and opened them with three SVG-capable tools on the Mac: Inkscape, Preview, Boxy SVG. They all showed nothing but white on white background.
Hi! I was trying to replicate this project on my D1 mini Pro and realised that it wasn´t being able to fetch the message from my gist file in any way.
I even tested all the componnents to look for any flaw on their connctions, but there is any and the Servo, Display and light sensor are working correctly. I am really lost, because it is indeed connecting to the WiFi (If I use my cellphone's conection as a router, it appears as a connected device) and my Gist url is written as /GitHub-username/Hash-Value/raw, but it still doesn't work.
Can somebody help me PLEASE?
Thanks :)
Hello,
first thanks for this amazing project.
Like you know chrismas coming :) and i want build this project for my girlfriend.
for the moment your program compil well and i have the message <3 LoveBox <3 appear on my screnn YESSS !!!!
But my probleme is about message on GIT.
I go to GIT i login , i click on "your gist" then i create new file name "test" inside i put that :
1
t
hello
Like i understand (let me know if i'm wrong)
so i've Two question if i'm correct on 1,2 and 3 why my message not appear ? My wireless works perfectly and i make my pat to my gist like this :
myusernameGIT/420b6eb87445c1eb50fb365b28fb7503.js/raw/test
maybe i mistake something ?
the second question can you explain me what you do exactly to show img.
for me i understant that :
Thanks for your amazing works and your help.
Hi Lisa.
Unfortunately the link to the light sensor is broken.
Can you tell me what kind of sensor i need to buy or provide a different link?
Thanks :)
I keep getting this error message:
credentials.h: No such file or directory
Is there another library I need in order to use this?
First of all thank you very much for this cute tiny cool box! I almost finished my first box. Unfortunately I have trouble with the display when using images. Every time the image is loaded another image with errors in the lower half / third of the display is shown. It seems that there is something shifted wrong. I attached some example images of that. Do you have any idea what's the cause? I already reduced the I2C clock down to 100kHz, used another display from another provider, added pull up resistors to the I2C pins. Nothing helped so far.
I have everything built and the code is uploaded. However after getting the first message it seems the code just stops checking for the new message. The while loop appears to just stop after the first time (I know this because my code is no longer looking for the lightValue).
Hello!
I absolutely love this project but due to this file not being included I am confused as to how to include it. I tried to find the file online but it does not match up. I am not the most advanced with coding so if you could include or explain how to get the file it would be much appreciated. Thank you so much!
Hi,
I have been at this for 2 months (crying face).
This is my first time using Arduino so could be a very easy fix.
When this code is run it prints "Connection to GitHub lost" which from what I know just means it's not even connecting to the git file.
Here is the txt file : https://gist.githubusercontent.com/thomasmore72/b3ca747d9852fbe407a11e629d854f96/raw/28a9bccb6b4e0f4d163644063b5a092e29700ed0/gistfile1.txt
Like I said brand new to this so if you have a potential solution I might need a bit of code to understand :D
#include <ESP8266WiFi.h>
#include <WiFiClientSecure.h>
#include <EEPROM.h>
#include <Servo.h>
#include "SSD1306Wire.h"
const String url = "/thomasmore72/b3ca747d9852fbe407a11e629d854f96/raw/28a9bccb6b4e0f4d163644063b5a092e29700ed0/gistfile1.txt";
SSD1306Wire oled(0x3C, D2, D1);
Servo myservo;
int pos = 90;
int increment = -1;
int lightValue;
String line;
String messageMode;
char idSaved;
bool wasRead;
void drawMessage(const String& message) {
oled.clear();
// differentiat between 't'ext and image message
if(messageMode[0] == 't'){
oled.drawStringMaxWidth(0, 0, 128, message);
}
else {
for(int i = 0; i <= message.length(); i++){
int x = i % 129;
int y = i / 129;
if(message[i] == '1'){
oled.setPixel(x, y);
}
}
}
oled.display();
}
void wifiConnect() {
Serial.begin(9600);
Serial.println();
WiFi.begin("Wifi Name", "Wifi Pass");
Serial.print("Connecting");
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.print(".");
}
if (WiFi.status() == WL_CONNECTED) {
Serial.print("Connected, IP address: ");
Serial.println(WiFi.localIP());
}
}
void getGistMessage() {
const int httpsPort = 443;
const char* host = "gist.githubusercontent.com";
const char fingerprint[] = "A1 46 14 C7 2A 1D 52 79 F6 AA 2B B2 C5 0A 3B D3 F5 02 06 75";
WiFiClientSecure client;
client.setFingerprint(fingerprint);
if (!client.connect(host, httpsPort)) {
Serial.println("Failed to connect to GitHub");
return; // failed to connect
}
client.print(String("GET ") + "/thomasmore72/b3ca747d9852fbe407a11e629d854f96/raw/28a9bccb6b4e0f4d163644063b5a092e29700ed0/gistfile1.txt" + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"User-Agent: ESP8266\r\n" +
"Connection: close\r\n\r\n");
// Wait for a response
if (!client.connected()) {
Serial.println("Connection to GitHub lost");
client.stop();
return;
}
// Read the response status code
String response = client.readStringUntil('\n');
if (!response.startsWith("HTTP/1.1 200 OK")) {
Serial.println("GitHub request failed with status: " + response);
client.stop();
return;
}
while (client.connected()) {
String temp = client.readStringUntil('\n');
if (temp == "\r") {
break;
}
}
//String id = client.readStringUntil('\n');
if(response[0] != idSaved){ // new message
messageMode = client.readStringUntil('\n');
if (messageMode[0] == 't'){
line = client.readStringUntil(0);
} else {
// binary image is corrupted if readStringUntil() takes too long
// fix: read string line by line
line = "";
for (int i = 0; i < 64; i++)
{
line += client.readStringUntil('\n');
line += "\n";
}
if (line.length() != 8256)
{
getGistMessage();
}
}
wasRead = 0;
idSaved = response[0];
EEPROM.write(142, idSaved);
EEPROM.write(144, wasRead);
EEPROM.commit();
drawMessage(line);
}
}
void setup() {
myservo.attach(16); // Servo on D0
oled.init();
oled.flipScreenVertically();
oled.setColor(WHITE);
oled.setTextAlignment(TEXT_ALIGN_LEFT);
oled.setFont(ArialMT_Plain_10);
oled.clear();
oled.drawString(30, 30, "<3 LOVEBOX <3");
oled.display();
wifiConnect();
EEPROM.begin(512);
idSaved = EEPROM.get(142, idSaved);
wasRead = EEPROM.get(144, wasRead);
}
void loop() {
if (WiFi.status() != WL_CONNECTED) {
wifiConnect();
}
getGistMessage();
Serial.print("/");
delay(5000); // wait a minute before request gist again
}
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.