insert current time
in
Programming Questions
•
3 years ago
import processing.net.*;
import processing.serial.*;
Serial port;
Client client;
String url;
String pin = "-------";
String myStatus = "ENTRY LOCK OPENED! SECURITY BREACHED!";
void setup()
{
client = new Client(this,"www.magichive.com", 80);
String portName = Serial.list()[1];
port = new Serial(this, portName, 9600);
}
void draw()
{
String s = port.readString();
if(s!=null)
{
String formattedStatus =myStatus.replaceAll("\\s","+");
println(formattedStatus);
client.write("GET /projects/smuggie/hellosmuggie.php?status="+formattedStatus+" HTTP/1.1\n");
client.write("Host: www.magichive.com\n\n");
}
}
but i want to insert the current time into the message to be posted in order to make each post unique. anybody knows how to do that?? please help me.
1