- #1
- 2,979
- 7,075
This is why I don't like intellectual property laws:
Hacker Mods Old Calculator to Access the Internet, CASIO Files DMCA Complaint
Hacker Mods Old Calculator to Access the Internet, CASIO Files DMCA Complaint
How do you access private source code within the calculator? That would be pretty absurd to put it there in the first place.Vanadium 50 said:Casio claims the repository contains its source code.
It's prima facie a false complaint.Vanadium 50 said:Casio claims the repository contains its source code. The repo owners claims it doesn't. Shouldn't take too long to see who is right.
//To fetch data from firebase, User2 should be your patners user name
String fetchStringData()
{
if (Firebase.getString(firebaseData,"/User2/chat"))
{
if(firebaseData.stringData())
{
return firebaseData.stringData();
}
else
{
return "No Text!";
}
}
else
{
Serial.println(firebaseData.errorReason());
}
}
//To send data to firebase, User1 should be where you send the data
void insertData(String value)
{
if (Firebase.set(firebaseData, "/User1/chat", value))
{
return;
}
else
{
Serial.println(firebaseData.errorReason());
}
}
/*This function writes the data to the file system*/
void writeDownloads()
{
File spiffTextFile = SPIFFS.open(textFilePath, "w");
if(spiffTextFile)
{
spiffTextFile.print(textFile);
spiffTextFile.close();
}
}
/*This reads the data from the file system and store it in textFile variable*/
void readDownloads()
{
File spiffTextFile = SPIFFS.open(textFilePath, "r");
if(spiffTextFile)
{
int i;
for(i=0;i<spiffTextFile.size();i++) //Read upto complete file size
{
textFile += (char)spiffTextFile.read();
}
spiffTextFile.close(); //Close file
}
}
/*
To read JSON file form flash
this setup is not necessary if you have to read single URL, u can get away with above function
but this helps us to get multiple fields in the esp hosted server to enter multiple data.
*/
void readFlashJson()
{
if(SPIFFS.exists(textFileUrlPath))
{
const char* _url = "";
File configFile = SPIFFS.open(textFileUrlPath,"r");
if(configFile)
{
Serial.println("Reading to file");
//getting the size of the file
size_t size = configFile.size();
//using buffer to get the data
std::unique_ptr<char[]> buf(new char[size]);
//store it in buffer
configFile.readBytes(buf.get(), size);
//closing the file
configFile.close();
//json buffer to store the json
const size_t capacity = JSON_OBJECT_SIZE(1);
//json buffer to store the json
DynamicJsonDocument doc(capacity);
//parsing the json object
DeserializationError error = deserializeJson(doc,buf.get());
if(!error)
{
_url = doc["link"];
textFileUrl = _url;
/*More debugging*/
// Serial.println(textFileUrl);
// Serial.println();
}
}
}
}