I have a 4D systems 4.3 inch touch http://www.4dsystems.com.au/product/uLCD_43D/ display that works fine with an arduino uno, but will not work on the Edison arduino breakout board. It should work by changing Serial.Begin --> Serial1.begin. But it doesn't. I searched and found a /thread/55790?start=0&tstart=0 few threads about executing a zillion commands and editing some files, but I figure the firmware would have been updated by now. I tried the suggestions anyway, http://i.imgur.com/DIWyJi8.jpg but got errors.
The display is wired to the Edison as such:Display Edison Arduino 5v5vGNDGNDTXPin 0 arduino header (rx)RXPin 1 arduino header (tx)
I'm wondering if it is an issue with the 4dsys library files (attached) not playing nice with the linux o/s... Anyone have any idea?
Let me know if anyone needs any more info.
I should note that I tried genie.Begin(Serial1). That doesn't work either.
I checked the code and the library. I tested the code you posted and it worked for Edison. I have an Arduino UNO so I compared the output of the Tx pin in each board and I got the same results. I added the following line to check there is something flowing from the Tx pin:
I added that line in the loop() function on the sketch. I got the output below for each board:
Figure 1. Arduino Test.
Figure 2. Edison Test.
The only detail you have to do with Edison is to change the Serial object to Serial1 as you already did. However you have to do this change in two locations. The lines you have to modify are the following:
Serial1.begin(9600); // Here you are initializing the Serial object to be used. That is, the serial port to be used.
genie.Begin(Serial1); // Here you are pointing the desired serial port to be used with the library.
In the test code you posted, you were only using the Serial1 object in the first line, so you were initializing the correct serial port but you were not linking the serial port with the library and the data wasn't being sent.
I don't have the display to do additional tests, but I think you will be able to do the tests by yourself making that change.
I tried setting this up but I'm still getting nothing out of serial1. I put a scope on the TX and saw nothing, but could see data from the display on the RX. One thing I noticed is that when I run the code on the uno, the TX pin is pulled high. On the Edison, the TX pin remains low.
Could I have faulty hardware?
The Tx pin should be HIGH like in the Arduino UNO. Try uploading a simple sketch to initialize the Serial port only. The sketch should have the following line in the setup() function:
Then upload the sketch and measure the Tx pin with the scope. It should be HIGH.
If the issue is still happening, I would suggest you to re-flash the Edison with the Flash Tool Lite (https://software.intel.com/en-us/articles/flash-tool-lite-user-manual IoT - Flash Tool Lite User Manual | Intel® Developer Zone) and then try initializing the Serial port again.
OK, so after using the Flash Tool, the serial 1 port works. The TX pin goes high and the 4DSYS display works. But if I hit the reset pin or cycle power to the Edison, it stops working. The TX pin will read low until I upload the sketch again.
This can't be normal.
That's a known issue of the latest image. The Arduino sketches don't start running once the board is reset. Hopefully it will be fixed in future releases. For the moment, there is a workaround posted by another user some time ago. I recommend you to check the following thread where the workaround is described: