Hello
I would like to create a graphical interface on pc (or android) to send data to a Teensy3.2. This data received by Teensy would be saved in Eprom.
What builder software can I use to create the interface?
Device-druid?
Does anyone have any examples, link ?
If you are wondering about the large text size in my Android app that is because I needed something that could easily be read at a glance while driving, even in bright sunlight conditions, which applies to my part of the world.
I will make an extract and post it tomorrow.Can you share me your code please for example.
VIRTUINO_t virt[lastVal+1] {
{"panelSelect" , "!V00=%i$" },
{"teensyTime_txt" , "!T00=%s$" },
{"tankAremaining_fld" , "!T01=%4.0f$"},
{"tankBremaining_fld" , "!T02=%4.0f$"},
{"kmPerHour_fld" , "!T03=%4.0f$"},
{"numSV_fld" , "!T04=%i$" },
{"avgCno_fld" , "!T05=%4.1f$"},
{"litrePer100km_fld" , "!T06=%4.1f$"},
{"randPer100km_fld" , "!T07=%4.1f$"},
{"water_fld" , "!T08=%4.1f$"},
{"oil_fld" , "!T09=%4.1f$"},
{"head_fld" , "!T10=%4.1f$"},
{"pressure_fld" , "!T11=%4.1f$"},
{"tankAcapacity_fld" , "!T12=%4.1f$"},
{"tankBcapacity_fld" , "!T13=%4.1f$"},
{"tankAdistance_fld" , "!T14=%4.1f$"},
{"tankBdistance_fld" , "!T15=%4.1f$"},
virtuino.sendD("tankBrefillDate_txt", Gps.year, Gps.month, Gps.day);
virtuino.sendT("tankBrefillTime_txt", Gps.hour, Gps.minute, Gps.second);
//--------------------------------------------
// send date ----
void sendD(String virtKey, int year, int month, int day) {
char str[20];
if(String S = vrtMap->get(virtKey).c_str()) {
sprintf(str,"%4i/%02i/%02i", year, month, day);
Bluetooth.printf(S.c_str(), str);
}
else
Serial.println(virtKey);
}
//--------------------------------------------
// send time ----
void sendT(String virtKey, int hour, int minute, int second) {
char str[20];
if(String S = vrtMap->get(virtKey).c_str()) {
sprintf(str,"%02i:%02i:%02i", hour, minute, second);
Bluetooth.printf(S.c_str(), str);
}
else
Serial.println(virtKey);
}
sscanf(vrtCmd.c_str(), "!%c%i=%f$", cmdType, &cmd, &var);
if(displayCommand)
Serial.printf("%s: Type: %s, Cmd: %i, Var: %f\n", vrtCmd.c_str(), cmdType, cmd, var);
//--------------------------------------------
// get incoming data on Bluetooth ----
String get() {
String returnLine = "";
byte inByte;
while ( Bluetooth.available() ) {
inByte = Bluetooth.read();
switch (inByte) {
case '\n': // end of text
input_line [input_pos] = 0; // terminating null byte
// terminator reached! now process input_line
// reset buffer for next time
input_pos = 0;
returnLine = input_line;
return returnLine;
break;
case '\r': // discard carriage return
break;
case '!': // start of virtuino command
input_pos = 0;
input_line [input_pos++] = inByte;
break;
case '$': // end of virtuino command
input_line [input_pos++] = inByte;
input_line [input_pos++] = 0; // terminating null byte
input_pos = 0;
returnLine = input_line;
return returnLine;
break;
default:
// keep adding if not full ... allow for terminating null byte
if (input_pos < (maxInput - 10))
input_line [input_pos++] = inByte;
break;
} // end of switch
}
return "";
} // end of get()
This is a very interesting project, quite similar to mine but with a different emphasis. You are concerned with monitoring modern high performance engines whereas my emphasis is on fuel usage of old fashioned diesel engines that lack electronic fuel injection. That was my brief, which was just too bad. I would have liked to measure fuel consumption by measuring the pulse width of the signal to the fuel injectors as that would have made for a more interesting project. Instead I am measuring fuel flow(using flow rate sensors) to and from the fuel distribution manifold. The difference is the fuel used by the engine.First prototype of my Dashboard https://github.com/NicoEFI/GDash
Can i use on iphone too ?
I am not find this information : If i build an application, can i use it on other model phone. Graphical design can broken ?