09-04-2014 10:42 AM
Hey guys, I'm currently using LIFA firmware to build a data monitoring system, I having 3 sensors used on pin A0, A1, A2 on my arduino and two digital output 3 & 11(PWM) to control my relay and motor. All these pins didn't interfere with the LCD keypad sheild I bought as it only uses pin 4,5,6,7,8,9 and 10 of the digital i/o pins. I was planning to display the frequency value of my DC motor on my LCD keypad shield using LIFA. But somehow when I tried to run the software the system seems to overlaps with my analogue pins and encounter an error.
Does anyone have the configuration of LIFA for data monitoring on LCD screen? will be much appreciated.
#image below was the LCD shield i use to intergrate with my arduino
09-04-2014 04:58 PM
Does reading the analog sensors alone work? Does writing to the LCD alone work? What do you mean by "the system seems to overlaps with my analogue pins and encounter an error"? What is the error? Could you please attach your VI?
09-05-2014 06:33 AM
overlaps means that, whatever words or numbers of string I key into the LCD display box, the analogue read value will increase to like 60, 200, 360 or so..i tried on all analogue pins..it act the same..
09-05-2014 06:56 AM
anyway, did anyone here uses lcd screen shield and analogue pin for sensor reading on any LIFA project? Would like to refer if you guys got it work...
09-05-2014 02:22 PM
You cannot branch the Arduino Resource wire (the pink wire). All LIFA VIs must be inline and there must only be a single Close VI.
Also realize that when you have an event structure without a timeout value, it will not allow the loop to execute. It will block the code from running until a registered event happens. This means that the analog value will only retrieved once, each time that the event stucture executes. So, if you put a timeout value of like 5 ms, the loop will run every 5 ms while you are not changing the LCD text.
09-06-2014 03:08 AM
I still dont quite get it.. How do i add timeout for this lcd display? I tried to run the lcd only once in my vi, just to display the starting words, but it still interrupt my analogue reading input for all the analogue pins..
I attached my VI file here, hopefully you can check for me what's the problem..
09-06-2014 12:30 PM
In this version of the VI, the LCD code has no effect on the analog reading code.
What is the expected frequency of your analog signals?
09-07-2014 01:20 AM
But my analogue value tends to go up to 60V ~ 200V when I run the VI with LCD screen mode. Eventhought the reading value on my A0~A2 was less than 5V...
09-07-2014 02:24 AM
I think there might be a bug in the LCD VIs. If LINX had support for the LCD, I would recommend that but unfortunately, it doesn't.
I think I've seen someone try to flush the serial buffer after doing the LCD stuff. If that doesn't work then I don't know what to say.
You didn't answer my question before about if you were able to get all the analog input stuff working (alone; without any LCD stuff). I would check that to see if there isn't something more fundamental causing the strange behavior.
09-07-2014 02:30 AM
Yup, my analogue reading working well without the implementation of LCD Screen, once i attach lcd module into my vi the analogue read become overlaps.