Proceeding with Mini2440 in Linux environment

Abhishek Ekhare
Hi,
In order to learn Linux and an embedded system, I started with Linux Mint
and FriendlyARM Mini2440 development board.

I got a lot of support and guidance from forums in this FriendlyARM
community.
I studied the basics of Linux from the book, Beginning Linux Programming by
Neil Matthew and Richard Stones.

I cross compiled the toolschain for Mini2440 and compiled and ran simple
applications on the Mini2440:-
https://alselectro.wordpress.com/2013/01/05/cross-compiler-installation-...

I also implemented tutorials by mini2440vietnam:-
http://mini2440vietnam.blogspot.in/2011/04/upgrade-qt462-in-mini2440.html

But the tutorials by minivietnam2440 are all Qt based. Although i have
successfully compiled Qt on my Mini2440, my need is to learn programming
the Mini2440 in Linux environment(without Qt).

I am trying to find tutorials to control the touchscreen and tft display,
but couldn't find anything that shows how to control the touchscreen and
tft without Qt.

I referred to the example codes provided with the Mini2440 and modified
them to toggle leds, use switches etc.

I need to write some programs to detect touch on the touchscreen, plot some
figures on the tft etc. Please share some links which would guide to start
programming the touchscreen and tft.

Abhishek Ekhare
Any tutorials/projects to drive TFT display and touch screen will do...

davef
https://en.wikipedia.org/wiki/Linux_framebuffer

https://www.opengl.org/wiki/Framebuffer

RRDtools for graphs

PHPplot (PHPlot)

Abhishek Ekhare
Hi davef,
I went through the links.

While searching for some help, i found this link:-
http://www.pengutronix.com/oselas/bsp/pengutronix/mini2440_bsp_en.html

I have downloaded the OSELAS.BSP-Pengutronix-Mini2440-Quickstart.pdf and am
reading it.

Should i go ahead with Pengutronix ???
How much will Pengutronix help me with Mini2440 ??

davef
I used the Pengutronix BSP for years.  If you are going to stick with the
mini2440 then it was a useful distro.  For a free package the support was
excellent.  Unfortunately, it hasn't been updated for over a year.

http://git-public.pengutronix.de/?p=OSELAS.BSP-Pengutronix-Mini2440.git;...

http://blog.gmane.org/gmane.comp.embedded.ptxdist.oselas.community

When compared with trying to do all the cross-compiling using your own
scripts and then trying to debug them it was a quantum-leap forward.

About a 9 months ago I got some NanoPi, which uses a newer chip similar to
the mini2440, but is now also EOL.  The real plus with the NanoPi is that
it comes with Debian Jessie and so just about any Linux program you want is
just a apt-get install "away".

The NanoPi2 has an Ubuntu-Core with embedded QT image, which I am going to
try out next week.

And then there is the NanoPC-T2, which I would consider buying next. 
Except I see there is a proposed NanoPC-T3.

The Quickstart guide is a very useful document.

What are your future plans?  To work in the field or just "play".

Abhishek Ekhare
What are your future plans?  To work in the field or just "play".

I have been working as an embedded systems engineer in biomedical field for
the past 8 years. All these years i have worked in Windows environment with
8051,PIC,AVR,MSP and ARM processors. I have designed many biomedical
equipments using these tools and deployed them on-site.

Recently i designed an Electrocardiogram(ECG) Holter device which collects
ECG data from patient and hosts it to server, and plots the same on PC and
Android/IOS based mobile applications.

But all these years i never got a chance to work in Linux environment, so i
started learning it. This forums helped me a lot to get going!! :-)

Regarding my future plans, i want to replicate the same holter on an
embedded system with Linux environment.
So i got myself a FriendlyARM Mini2440 which has good processor speed,
memory, ARM controller to do ECG filtering operations, WEB server, decent
price, etc...just suitable for my project.

My aim is to read ECG from SPI-based Analog Front-end and plot it on the
Mini2440's display. I would also like to add some touch screen
functionalities like "Start ECG Plotting", Stop ECG Plotting" etc...

I have already done the ECG acquisition and filtering part in my Windows
based project. So for Mini2440 project, i need to read the SPI and plot the
ECG on Mini2440's display.

So basically i want to work in the field rather than just "play".

I am extremely grateful to you for asking me this question. It allowed me
to express my exact requirement and expectation from the Linux+Mini2440.
Thanks a ton!!

Abhishek Ekhare
A simple step on my side would be to just connect a simple temperature
sensor to the Mini2440, and display and plot the temperature values on the
Mini2440's display.

But i got so much jumbled, trying lot of things like Qt etc that now i
don't understand how to proceed.
And this forum is the only help i got coz there's no one around proficient
enough with embedded systems in Linux environment.

Leaving the development simply because i cannot find anything, is not an
option. I want to complete what i have started. I really appreciate your
help. This simple temperature sensor project is sufficient for me to get
going.

davef
I went through the pain of getting a SPI kernel driver to perform a
loop-back test and then moved all my data acquisition to a ATmega32U4 dev
board from Adafruit.

A DS18B20 was easy to interface to the ATmega32U4 using Teensy USB serial
code and some I2C libs by Martin Thomas.

Paolo at sereno-on-line did a Qt app on a mini6410.  I can find some of the
threads but not his site.

Have you considered the NanoPi2 with a matrix kit?  A current and much
better learning environment.

davef
RRDtools is a real-time graphing program.  Think it would be ideal for an
ECG printout.  How to integrate it with some touch buttons?  Maybe, Qt

http://www.friendlyarm.net/forum/topic/1068  is the oscilloscope Paolo
started.

I am not trying to discourage you from trying to do it on a mini2440, just
that is a fairly big job.

How about Qt Creator and see if you can develop your GUI. (mini2440vietnam)

There is a bit of information on SPI for the mini2440 around.

Are you comfortable re-compiling kernels?

Abhishek Ekhare
Actually i couldn't get my touchscreen to work in Qt. I had discussed that
with you in the thread:-
http://www.friendlyarm.net/forum/topic/6602

So i left Qt altogether to focus on learning Linux and Mini2440.

Should i switch back to Qt for developing my application ??
But then, for Qt, the touchscreen problem remains !!

Abhishek Ekhare
All the links in 
http://www.friendlyarm.net/forum/topic/1068 
lead to bad request.

I have used the DS18S20 temperature sensor before.

"Are you comfortable re-compiling kernels?"
No, i am not. I think i need to learn this first. 
Any sources for learning kernel development and compiling ??

Abhishek Ekhare
Hi Dave,
I will learn the kernel compiling part.
I need to get my touchscreen working with Qt first.

I tried everything given by <mini2440vietnam> for Qt compilation on
Mini2440, but my touchscreen doesn't seem to work with Qt.
How do i get my touchscreen to work ??

davef
I posted a touchscreen response on the other thread.

Google for <Building Embedded Linux Systems.pdf>  The 3rd edition might be
available for download.

davef
Any hints in here?

https://importgeek.wordpress.com/2012/04/09/compiling-qt-and-tslib-for-m...

15 pages

http://billforums.station51.net/viewtopic.php?f=8&t=15

Abhishek Ekhare
Hi Davef,

https://importgeek.wordpress.com/2012/04/09/compiling-qt-and-tslib-for-m...
is exactly what is used for compiling Qt on my Mini2440.
I have followed all the steps mentioned in this link.

billforums.station51.net/viewtopic.php?f=8&t=15
advises to run a script to calibrate the tft and run a demo, which i will
try.

I will go through the <Building Embedded Linux Systems.pdf> straightaway.

Abhishek Ekhare
Further, in
https://importgeek.wordpress.com/2012/04/09/compiling-qt-and-tslib-for-m...
, export TSLIB_TSDEVICE=/usr/local/tslib/lib/ts 

while in http://billforums.station51.net/viewtopic.php?f=8&t=15 , 
export TSLIB_TSDEVICE=/dev/input/touchscreen0

I have tried the first one and it doesn't work. Will try the next one...

davef
I think I mentioned this recently in another thread, tell me all the
entries that you have in /dev/input/

Abhishek Ekhare
The contents of /dev/input are
event0    mice

davef
Doesn't look like many /dev entries!  Did you check what event0 as
described recently?

I will check my Pengutronix BSP

davef
On my mini2440:

event0       stylus
event1       is a link from buttons
event2       keyboard
event3       mouse
mice         mouse
mouse0       stylus
mouse1       mouse
touchscreen  is a link to event0

I'd be surprised if your event0 was not the stylus input.

My Pengutronix Qt related settings in profile.environment

# Mini2440 related settings
MINI2440_FBDEV=/dev/fb0
MINI2440_KEYEVENT=/dev/input/event2
MINI2440_TOUCHEVENT=/dev/input/touchscreen

# touchscreen relevant settings
export TSLIB_TSDEVICE=${MINI2440_TOUCHEVENT}
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=${MINI2440_FBDEV}
#export TSLIB_CALIBFILE
#export TSLIB_CONFFILE
#export TSLIB_PLUGINDIR

# Qt relevant settings
#export QWS_MOUSE_PROTO=Tslib:${MINI2440_TOUCHEVENT}
export QWS_MOUSE_PROTO="MouseMan:/dev/input/mice
Tslib:${MINI2440_TOUCHEVENT}"

I don't know how the relevant dev nodes are made. I do know how to create
them but do not have a clue from to connect them to the relevant bit of
hardware.

Abhishek Ekhare
"event0       stylus
event1       is a link from buttons
event2       keyboard
event3       mouse
mice         mouse
mouse0       stylus
mouse1       mouse
touchscreen  is a link to event0"
How do we determine these parameters ??

Further, in export QWS_MOUSE_PROTO="MouseMan:/dev/input/mice, what is
"MouseMan" ??

I am using export QWS_MOUSE_PROTO=tslib:/dev/input/event0. 
If i determine parameters of my Mini2440, i will change them to appropriate
ones...

Abhishek Ekhare
Attachment: Screenshot_2016-04-26-10-09-14.png (294.26 KB)
"Doesn't look like many /dev entries!"

No, there are lots of entries in my /dev. Check attachment.
But just two entries in /dev/input...

davef
Sorry, I did mean /dev/input

> MouseMan

Good question.  I was told to try it and it worked.

cd /dev/input
   cat event0

and move your finger over the touchscreen.  You should see a stream of
characters on your display.  Or move the mouse or type characters on the
keyboard.

After the rubbish you may have to reboot or type cd/home and enter might
get you back to a normal screen.

davef
Pengutronix mini2440 quick start.pdf

A functional touchscreen depends on some external configurations and
parameters. Firstly, the touchscreen
driver for the S3C2440 CPU must be enabled in the kernel. If it is
supported, it can be checked at run-time with
the following command:

# ls /sys/bus/platform/drivers

A samsung-ts must be listed in this directory. If not, the kernel must be
re-configured to support this device.

Secondly, a functional touchscreen depends on is the registered touchscreen
device. If it is registered, this can
be checked at run-time with this command:

# ls /sys/bus/platform/devices

A s3c2440-ts must be listed in this directory. If not, something is
preventing the kernel from registering this device.

Abhishek Ekhare
"Or move the mouse or type characters on the keyboard."

I have never connected mouse or keyboard to my Mini2440.
I have always communicated with Mini2440 through putty terminal.

But will do 
cd /dev/input
   cat event0 
and get back.

Btw, where can i find the "standard" list of environment variables for Qt
and Mini2440 ??

Also how can i find my 
"event0
event1       
event2       
event3       
mice         
mouse0       
mouse1       
touchscreen" ??

davef
I am not aware of any standard list.

You will not have all those entries unless you use the Pengutronix
mini2440BSP and have Qt set up the same way as me.

ADDED INFO:  the entries in /dev/input are called <event nodes>

I am doing all these tests not using minicom/putty.

I will connect up the system and do it your way.

davef
Using minicom I get the same behaviour.

I am at a remote location (daily data allowance 16MB) and haven't got all
my LINUX docs.  In one of the long QT threads on this site I posted a doc
called something like QT browser Pengutronix.  Search around and see if you
find it.

Abhishek Ekhare
Read some of your discussions in the forums:-

http://www.friendlyarm.net/forum/topic/6417

http://www.friendlyarm.net/forum/topic/6328

http://www.friendlyarm.net/forum/topic/3086

The OP in http://www.friendlyarm.net/forum/topic/6328 seems to have solved
the touchscreen issue. Lets see if he has some inputs for us...

I will search the QT browser Pengutronix doc and get back.

davef
I re-checked the other thread and see I posted the document!

I need to establish what you mean by the touchscreen does not work. I might
be going down a detour talking about the stylus input.

Is the the actual display doesn't work or the stylus?

davef
If it is the touchscreen display that is not working ,,, have you got a
/dev/fb0

Abhishek Ekhare
Attachment: dev.png (294.26 KB)
"If it is the touchscreen display that is not working ,,, have you got a
/dev/fb0"

Yes, i have /dev/fb0. I am attaching its screenshot.

My touch screen works when i un-comment Qtopia from /etc/init.d/rcS.


"Is the the actual display doesn't work or the stylus?"
Sorry, I didn't understand this question.

davef
The touchscreen has two functions:
- display stuff using the framebuffer
- the touch function, ie either using your finger or a stylus

davef
For some reason Xubuntu will not display your screenshots.

When you comment out the lines in rcS what is your next step in trying to
see something on the display?

Abhishek Ekhare
I directly used
http://mini2440vietnam.blogspot.in/2012/06/control-leds-on-mini2440-by-q...
for application.
I think Qt uses the framebuffer internally, i haven't used the framebuffer
directly (although it is on my todo list once i get my touchscreen
working!!)

In the above link, if you see the OP's video in which he has shown his
working system, he is using the stylus.

And i get the display i.e. i can see the buttons and graphics on the
screen, but i cannot use them as the touchscreen is not working.

So i think that the display stuff is working but the stylus touch is not
working...

davef
OK, it is the stylus that is not working..

What happened when you did the 

cd /dev/input

   cat event0

Abhishek Ekhare
When you comment out the lines in rcS what is your next step in trying to
see something on the display?

I paste the export variables in bith rcS and profile file.
After that i run:-
$cd /mnt/demos/embedded/fluidlauncher/
$./fluidlauncher -qws
which runs correctly.

After that i referred to mini2440 vietnam's tutorial to display simple
Hello World on the screen:
http://mini2440vietnam.blogspot.in/2011/05/programming-application-for-m...
this one also runs perfectly.

And lastly, i refer this tutorial by mini2440 vietnam to control leds using
touch screen:-
http://mini2440vietnam.blogspot.in/2012/06/control-leds-on-mini2440-by-q...
wherein i can see the graphics in the display, butthe touchscreen doesn't
work.

davef
The last step is the first time you want the touch input to work on the
display.

The result to my last request?

davef
Did the stylus work in Qtopia?

Abhishek Ekhare
Yes stylus works well in Qtopia.
Will post the results 
cd /dev/input

   cat event0
soon...please gimme some time.

Abhishek Ekhare
Hi Davef,
I tried doing cd /dev/input
cat event0, but nothing happens in the terminal or on the screen !!

Abhishek Ekhare
I just used framebuffer(/dev/fb0) to print some red color shades on the
display.
I also connected mouse to the USB port of the Mini2440. The putty terminal
shows "Optical mouse connected", but the cursor doesn't move...

Abhishek Ekhare
I developed some more apps involving touchscreen and display in Qt.
I can see the from on the tft, but touch doesn't work...

davef
> I tried doing cd /dev/input
>    cat event0, but nothing happens in the terminal or on the screen !!

Now, I think we are getting somewhere. 8 hours after I first asked you to
do it.

Re-enable Qtopia and do the same thing.

davef
As for the mouse ... notice I have 3 mouse event nodes in /dev/input/

When you plug the mouse in and boot up the mini2440 what do you have in
/dev/input  ?

davef
Another thought ... when you are setup to run your Qt application find out
what event0 is really connected to.

Plug in a mouse and keyboard and fire the board up and cat event0 and move
the mouse and type on the keyboard.

Abhishek Ekhare
Attachment: 20160427_213741.jpg (3.4 MB)
Hi Dave,
Sorry for replying late.

"Re-enable Qtopia and do the same thing."

In this case, the touch screen works, but shows the Qtopia screen when
touched.

It appears like both screens overlap each other. Qtopia screen at the
bottom and Qt app screen on the top. Once touched, the Qtopia screen
appears partially where touched.
Please see the attachment, you will understand what i am trying to say !!

Abhishek Ekhare
"When you plug the mouse in and boot up the mini2440 what do you have in
/dev/input  ?"

In this case, in dev/input/

event0 event1 mice mouse0

Abhishek Ekhare
"Plug in a mouse and keyboard and fire the board up and cat event0 and move
the mouse and type on the keyboard."

cat event0 doesn't show anything whereas cat event1, cat mice, cat mouse0
show wayward data in the putty terminal when mouse is moved...

Abhishek Ekhare
This happens when Qtopia is enabled...

Abhishek Ekhare
Same thing when Qtopia is disabled...

davef
Sorry 3.4M I won't download.  Can you resize it?

I see you are getting more /dev/input entries now, instead of just event0
and mice.

In Qtopia and checking each /dev/input entry should show a response to
touching the screen. If not I don't understand how the touch feature of the
display is working.

Are you saying that you get similar "wayward" data in all 3 /dev/input
entries, event1, mice and mouse when moving the mouse? 

I'll check event1 on my system.

Abhishek Ekhare
Attachment: 20160427_213741.jpg (19 KB)
"Sorry 3.4M I won't download.  Can you resize it?"
Sorry, attaching a smaller resized image. See how the screen behaves when
Qtopia is enabled and Qt application is executed.

"I see you are getting more /dev/input entries now, instead of just event0
and mice."
That's right. I get only 2 entries(viz. event0 and mice) when mouse is not
connected and 4 entries(viz. event0 event1 mice mouse0) when mouse is
connected.

"In Qtopia and checking each /dev/input entry should show a response to
touching the screen. If not I don't understand how the touch feature of the
display is working."
Except for event0, rest all cat entries(cat event1, cat mice, cat mouse)
show wayward data on the terminal when mouse is moved, not when screen is
touched !!

"Are you saying that you get similar "wayward" data in all 3 /dev/input
entries, event1, mice and mouse when moving the mouse? "
Yes, only when mouse is moved. Not when screen is touched.

davef
Something is wrong I can't see the image.  Could you check it works for
you?

Ah, you appear to have hotplugging enabled.  Which images are you running
on the unit?

I was reading through some threads and 1-wire was mentioned.  I thought
1-wire was on the mini6410 and not the mini2440, but I could be wrong.

One way to check is to see which adc entries there are in /dev and also in
a /sys folder.  I'll check mine and get back.  

Something you could try is commenting out one of the entries in your rcS
file, ie the mouse, reboot and see if that changes the number of entries in
/dev/input.

I think it is udev that manages the /dev event nodes.

davef
/sys/devices/platform/s3c24xx-adc/s3c-hwmon/

ADC channels 4,5,6 and 7 are used for the touch feature.

In this directory do:

   cat in4_input
   cat in5_input
   cat in6_input
   cat in7_input

Also, copy paste the contents of your /etc/pointercal file

By the way you were able to do a ts_calibrate in Qtopia, but not when you
"disabled" Qtopia".

Section 8.10 in the Oselas Quickstart guide talks about touchscreen
problems

davef
Can't find anything that suggests 1-wire for mini2440.

Abhishek Ekhare
"1-wire was on the mini6410 and not the mini2440, but I could be wrong."
I can see touchscreen-1wire in my /dev directory.

"copy paste the contents of your /etc/pointercal file"
Give me sometime for this.

"By the way you were able to do a ts_calibrate in Qtopia, but not when you
"disabled" Qtopia"."
I was able to use touchscreen when i enabled Qtopia, but i didn't do
tc_calibrate. Will do that as well and get back.

"Section 8.10 in the Oselas Quickstart guide talks about touchscreen
problems."
Will go through this.

Abhishek Ekhare
I found some excellent examples here:-
https://github.com/Wingie/mini2440_Examples

And the same thing again, display works well but no touch !!

From the link, i compiled the Mini2440 applications as well the Qt
applications, and both compiled and ran on the Mini.
So i think i have cross-compiled and set the qmake and used it in Qt
creator correctly.
Something's wrong with the touchscreen though.

Abhishek Ekhare
Dave,
One think to notice is that both the tutorials suggest:-
export TSLIB_TSDEVICE=/usr/local/tslib/lib/ts 

Whereas i checked all my stuff by using:-
export TSLIB_TSDEVICE=/dev/input/event0


And there are people in both the tutorials who have said that they got the
system working.
Mini2440vietnam has even uploaded a video of his working system in one of
his tutorials(which even i followed!!).

How come nobody is facing the same problem as mine in both the tutorials ??

davef
> I can see touchscreen-1wire in my /dev directory.

On the mini2440?

Isn't doing a ts_calibrate in the tutorial?

> How come nobody is facing the same problem as mine in both the tutorials
??

When we find out what is wrong on your system ...

Abhishek Ekhare
"On the mini2440?"
Yes, on the mini2440 !!

"Isn't doing a ts_calibrate in the tutorial?"
No !!

davef
Mine is:

export TSLIB_TSDEVICE=/dev/input/touchscreen

From memory you were asked to do a ts_calibrate the first time you ran
Qtopia on the board.

I have done it many times since to get the touch to run properly.  The
resolution is quite fine and to operate a button requires fairly careful
calibration.

I asked for your pointercal file about 2 hours ago.

davef
Well, I wonder if anyone has tried to run 4.6.2 Qt apps on a 1-wire
mini2440.  Again searching on the forum might turn up something.

Abhishek Ekhare
Hi Dave,
"Mine is:
export TSLIB_TSDEVICE=/dev/input/touchscreen"
Do you have touchscreen-1wire in your /dev directory ??


"I asked for your pointercal file about 2 hours ago."
Sorry, i am not having my Mini2440 with me right now to give the details of
/etc/pointercal. Will give them by evening.

"From memory you were asked to do a ts_calibrate the first time you ran
Qtopia on the board."
Yes, i had done a ts_calibrate in Qtopia wherein it prompts to touch the
screen at various points. It had worked then.

Abhishek Ekhare
"Again searching on the forum might turn up something."
I was going through some links and it struck me that since i have
/dev/touchscreen-1wire,
i need to do 
export TSLIB_TSDEVICE=/dev/input/touchscreen-1wire
instead of 
export TSLIB_TSDEVICE=/usr/local/tslib/lib/ts 
or 
export TSLIB_TSDEVICE=/dev/input/event0

and
export QWS_MOUSE_PROTO="tslib:/dev/input/touchscreen-1wire
instead of
export QWS_MOUSE_PROTO=tslib:/dev/input/event0

Maybe this is the thing !!

Abhishek Ekhare
In the forum:-
http://www.friendlyarm.net/forum/topic/5609
the OP suggests this:-

Configure the environment in mini2440:

$cd /etc/
$vi profile

add those lines at the end of file. please verify that you have these files
at the locations specified. otherwise change location as per your system

export USER LOGNAME PS1 PATH
export LD_LIBRARY_PATH=/usr/local/tslib/lib
export QTDIR=/usr/local/Qt
export QWS_MOUSE_PROTO="tslib:/dev/touchscreen-1wire
IntelliMouse:/dev/input/mic
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_PLUGINDIR=/usr/lib/ts
export TSLIB_TSDEVICE=/dev/touchscreen-1wire
export TSLIB_TSEVENTTYPE=INPUT
export QWS_DISPLAY=LinuxFB:mmWidth=105:mmHeight=140



go to friendly arm forum given at end of following link
http://www.friendlyarm.net/downloads

go to /src
file name: one-wire-ts-input-src-20111026.tar.gz
=====================================
an open source tslib for FriendlyARM one wire touch screen, only for Linux,
not Android


How to use
=====================================
by FriendlyARM, 2011-10-26

step1: unzip the source code tarball
    #make
   you will get one-wire-ts-input.so, put it into the tiny6410
board: /usr/lib/ts/
Step2:
   vertify the first line in file "/etc/ts.conf"  to:
   module_raw one-wire-ts-input

5. Run Qt example program:

Now we can test Qt example programs

$cd /mnt/demos/embedded/fluidlauncher/
$./fluidlauncher -qws

use touch now :-)

Please note his TSLIB_TSDEVICE and QWS_MOUSE_PROTO parameters !!

Are we moving towards a solution!! ??

Abhishek Ekhare
export QWS_MOUSE_PROTO="tslib:/dev/touchscreen-1wire
export TSLIB_TSDEVICE=/dev/touchscreen-1wire

After this when i run the Qt applications and touch the screen , it prompts
"selected device is not a touchscreen, i understand"

Abhishek Ekhare
Attachment: pointercal (42 Byte)
/etc/pointercal

Abhishek Ekhare
cd /usr/local/bin
./ts_calibrate

yields:-
Couldn't load module input
No raw modules loaded
ts_config: Success

Abhishek Ekhare
Also, i couldn't find one-wire-ts-input-src-20111026.tar.gz.

/dev has adc. How to determine which touchscreen i am having on my mini2440
??

Abhishek Ekhare
Back to square one with following as my environment variables:-
export LD_LIBRARY_PATH=/usr/local/tslib/lib
export QTDIR=/usr/local/Qt
export QWS_MOUSE_PROTO=tslib:/dev/input/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/usr/local/etc/ts.conf
export TSLIB_CONSOLEDEVICE=none
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/usr/local/tslib/lib/ts
export TSLIB_TSEVENTTYPE=INPUT
export QWS_DISPLAY=LinuxFB:mmWidth=105:mmHeight=140

Display working, touchscreen not working !!

Abhishek Ekhare
export TSLIB_TSDEVICE=/usr/local/tslib/lib/ts

for this also, running ./ts_calibrate says:-
"selected device is not a touchscreen, i understand"

Abhishek Ekhare
/sys/devices/platform/

there is no entry for s3c24xx-adc!!

davef
I could expect that if it is 1-wire that there MIGHT not be an adc?

Check that the pot reading changes values when tweaked in Qtopia, refer to
the user guide.

Refer to my previous post:

/sys/devices/platform/s3c24xx-adc/s3c-hwmon/

ADC channels 4,5,6 and 7 are used for the touch feature.

In this directory do:

   cat in4_input
   cat in5_input
   cat in6_input
   cat in7_input

That is how you will find out if the ADC channels for the touchscreen are
working.

I do not know if ts_calibrate is used with 1-wire.  I would expect that
would still need to calibrate the screen.

davef
Try running ts_calibrate back in Qtopia.

Abhishek Ekhare
"Refer to my previous post:

/sys/devices/platform/s3c24xx-adc/s3c-hwmon/

ADC channels 4,5,6 and 7 are used for the touch feature......"


From my previous post (with 112.5 KB screenshot):-
/sys/devices/platform/

there is no entry for s3c24xx-adc!!

Abhishek Ekhare
Condition-1) /dev/touchscreen-1wire.
Condition-2) No adc entry for s3c24xx-adc in /sys/devices/platform/.

Are both these conditions sufficient to conclude that my Mini2440 has a
1-wire touchscreen ??

davef
I'd say so.  You must have one of the later units.  

I have no 1-wire experience on the mini2440.  ATmega32U4 yes.

Mine are 4-5 years old and only 64MB RAM.  Yours could be 256MB or even 1GB
which require special versions of uboot.

Abhishek Ekhare
Tried searching a lot, but couldn't find anything relevant except for
downloading "one-wire-ts-input-src-20111026.tar.gz" and following the
instructions in http://www.friendlyarm.net/forum/topic/5609

The problem is, i cannot download "one-wire-ts-input-src-20111026.tar.gz".
The OP in the link mentions to download it from /src on
http://www.friendlyarm.net/downloads. But there's no such thing on the
friendlyarm website.

Abhishek Ekhare
Couldn't find  "one-wire-ts-input-src-20111026.tar.gz".
No luck with touchscreen !!

Abhishek Ekhare
I can execute and calibrate the touchscreen when i enable Qtopia.

I ran some programs to display colors on the display.
How can i plot a moving sine wave on the display ??

Abhishek Ekhare
I referred to the link
http://www.friendlyarm.net/forum/topic/2733

The last reply says:
"The problem is with the new displays they are using 1-wire.
For some reason the 1-wire file is not accessible when a Qt app is
executing.

Luckily the LCD board makes provision to switch to the analog touch screen.

Modify the board: http://www.friendlyarm.net/forum/topic/6101";

They have mentioned some modifications to the board for it to work with
1-wire touchscreen.

davef
Remove the "; at the end of the link :)

What a performance!  Good luck with modifying the board.

Do you need to persist with the mini2440 or could you move your development
to one of their newer product?

Abhishek Ekhare
The ";" was a typo though!!
I don't think modifying the board is a good idea. I won't attempt it.

I already displayed some text, plotted lines  etc on the display.
Touchscreen not working is the only issue that remains.

I think i should switch to a new board, which ones do you suggest ??

P.S: I will definately complete my temperature sensor display project on
the Mini2440, before the new board arrives ;-) !!

davef
They have brought out about 5-6 new units over the last 6 months.

I had a quick look at running the QT embedded image on a NanoPi2. 
Unfortunately, I don't how to escape the demo (fluidlauncher?), however
running QT apps on it must be easy.  

Heatsinking is preferred on this unit and someone made a recent comment
about bad RAM, so need to check mine.

I would buy a NanoPC-T3 next to use as a low-power desktop.  I run the
NanoPi as a automation controller as the power consumption is quite low.

Depends what your interests are.