Skip to main content

Timeline for Serial data affected by interrupt

Current License: CC BY-SA 3.0

11 events
when toggle format what by license comment
Jun 20, 2017 at 8:41 history edited Greenonline CC BY-SA 3.0
Added code formatting
May 27, 2017 at 20:41 comment added Jot LOW and HIGH is 0 and 1, but it is better to make good readable code, than trying to write weird code. Without String objects, the sscanf can be used to split the serial data. The strtok function could be used as well. Or even using array indexes and making the strings zero-terminated is also possible. You could add a boolean variable next to kInjTime. For example: boolean kInjTimeEnable = false; I think the 'a', 'b', 'c', 'd' are local variables, you can declare those inside the for-statement: for ( int a = 0; a < 2..... and there are more variables that are only used locally.
May 27, 2017 at 7:07 comment added Hasan Ok, using local variable some time it gives error like variable is not declared in this scope . So, I made all variables global.
May 27, 2017 at 7:03 comment added Hasan But 1 or 0 perform same things as HIGH or LOW do...
May 27, 2017 at 7:03 comment added Hasan digitalPinToInterrupt ... Ok, that thing I keep in my mind.
May 27, 2017 at 7:01 comment added Hasan Ok, means I have to use another variable which holds 0 or 1?
May 27, 2017 at 6:59 comment added Hasan Ok, that "Serial.read" portion is capture serial data. Ok, I can try to rewrite that portion.
May 27, 2017 at 6:52 comment added Hasan Ok.. Means I have to initialize all that variable made volatile which I used in the Interrupt routine.
May 27, 2017 at 6:49 comment added Hasan "data_" strings are displaying the value of data. Suppose serially data {"TPS":"0.40","MAP":"0.95","LOAD":"14"} comes. Then that "data_" strings hold 0.40, 0.95 & 14.
May 27, 2017 at 6:41 comment added Hasan Oh...Thank you for this points that you mentioned. Let me explain every point.
May 26, 2017 at 16:40 history answered Jot CC BY-SA 3.0