Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 26 to 50 of 58

Thread: Teensy 3.2 as HMI display (Editor development)

  1. #26
    Senior Member
    Join Date
    Oct 2013
    Location
    Rogersville MO
    Posts
    253
    @FrankB My understanding there is a cap not grounded on the board? Are you going to fix or is it trivial to jumper? I need to order from OSH as this is moving forward.

    Carter

  2. #27
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,659
    HI,

    yes, there is a GND area some 1/10mm away. Or, maybe, it works without the cap?

    The ParallelFlash interface is tested, the lib (compatible to Pauls SerialFlash) is in the works. At the moment, i don't know wether it is faster than serial, or not
    Display works, touch too, backlight pwm works (use a very low resistor (or an other FET?))

    The only thing not tested is the (Parallel-)RAM - i think we don't need it. Maybe! i add it later (...and the software has to be done)

  3. #28
    Senior Member
    Join Date
    Oct 2013
    Location
    Rogersville MO
    Posts
    253
    I tried to run the jar file under Ubantu 14.04 but java 8 not supported, it does run under windows 7.

  4. #29
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,659
    On thing, maybe you should remove the SD-Slot on the display - this depends on how you solder the board - the Serial Pinheader is very near. Or use some kind of isolation.

    Edit: The Board is intended for 2.8'' version of the display...
    Last edited by Frank B; 03-31-2016 at 02:39 PM.

  5. #30
    Senior Member fms1961's Avatar
    Join Date
    Jul 2015
    Location
    Northern Germany
    Posts
    153
    A little description what data we need to transfer to the Teensy (TCD-Editor = Teensy Controlled Display - Editor ...)

    1. Several pages will be possible
    2. a page contains the following:
    • page ID (unique)
    • background image or CSS style
    • optional title
    • opt. page browser (first/prev/next/last)
    • list of multiple control items
    3. a control items contains the following:
    • item ID (unique)
    • (multiple) state images or CSS style (e.g. two images for "button pressed" and "button not pressed")
    • (multiple) dynamic bitmap snippets to allow moved controls like knobs, sliders etc.
    • label text (if not rendered in the image)
    • getter/setter for "value" (value is the data represented by the item)
    • validation for "value" (maxVal/minVal, zero pos, data type)
    • methods to hide/show
    • methods to add/remove

    So there will be several steps of loading a new GUI (e.g. one page only):
    - at first load the page data (id, image, text, pagebrowser)
    - then add the items one by one (id, images, text)
    - instanciate and arrange all items (the "sceleton" of the items must be implemented in the Teensy)
    - start the "watchdog" (wait for items value changes or item value requests)

    The essential will be a value change, which will result in a change on the screen - a switch toggles, a slider moves it's knob, a progressbar moves on etc.)

    The communication between the operating Teensy and the TCD will be very lean (example for discussion):

    Protocol description:
    - "<command>" start/stop - starts or stops the reaction on commands
    - "<command> <page ID> <item ID> <new value>" - "set_val pag2 but3 45" will write the value of button 3 to 45, showing page 2
    - "<command> <page ID> <item ID> <new value>" - "get_val pag2 but3" will read the value of button 3 on page 2
    - "<command> <page ID>" - "set_val pag3" will just change the page
    - "<command> <page ID> <item ID>" - "hide pag3 slid3" will hide the Slider slid3 on page 3 (show will do the opposite)

    With this little set of commands I believe we may create already good displays!

    One question: is the Teensy powerfull enough to render a fast turning arrow by itself? (Drawing routines or small bitmap rotated in real time)?

    Let's start to brainstorm ... ... and we need to define the data structure to be loaded into the Teensy ...
    Last edited by fms1961; 03-31-2016 at 02:49 PM.

  6. #31
    Senior Member fms1961's Avatar
    Join Date
    Jul 2015
    Location
    Northern Germany
    Posts
    153
    A new version of the TCD-Editor is availabe at my Github repository - be aware it's an early alpha version! There are some more steps to walk until some data might be generated and dumped to the Teensy ...

  7. #32
    Senior Member fms1961's Avatar
    Join Date
    Jul 2015
    Location
    Northern Germany
    Posts
    153
    @Frank B: the board arrived today, THX! S0o I only have to wait for the display itself (I gave my last one to my son ...)

    Click image for larger version. 

Name:	IMG_2754.jpg 
Views:	76 
Size:	257.3 KB 
ID:	6927

  8. #33
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,659
    The art of soldering...NOT

    Well, at least all other connections and ParFlash should work. I could'nt test this particular board..

    p.s. the 5v in is optional.
    Last edited by Frank B; 04-05-2016 at 07:35 PM.

  9. #34
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,659
    Click image for larger version. 

Name:	tcd.jpg 
Views:	78 
Size:	48.7 KB 
ID:	6928
    Looks great

  10. #35
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,809
    Quote Originally Posted by Frank B View Post
    The art of soldering...NOT
    Frank - are you using solder wire or paste? I got some paste and it has worked well if you 'properly' blob the pads then center and touch the iron. I've not tried much small stuff yet - but this frees up a hand and makes the mechanical manipulation part easier.

  11. #36
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,659
    I use solder wire. In all the time, i've never managed to order some paste.
    Which one are you using ? There are some low-temperature-pastes, right ?
    Are they ok ? Can i use an old oven or electrical cooking-plate ?

  12. #37
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,809
    To keep this on topic, which I'm watching - this looks like an interesting project! Frank - can you send me your OSH Eagle drawings? There is a new local guy starting up offering boards at $2.50/sq in - If I had working drawings it might be interesting to send him to see if I get usable products - and give him some paid practice. I think his requirements are the same: https://maker.works/
    This is an ALPHA program: (Example: For $7.5 you can get 4 copies of a 3 square inch board. ) :: includes FREE first-class shipping
    This is what I got and had good luck with: SRA-Low-Temperature-Lead-Solder-Paste

    I use very little very infrequently. The needle was easily clogged - so I plugged the needle with wire and just remove/unscrew the needle tip and squeeze out a needed pile on a sheet of paper. Then scoop it onto the desired pad. Seal up the needle tip and dispose of the paper.

    I've used it to put SMD caps on onehorse pins (ESP in development), solder one of your CONNECTOR boards, solder a onehorse 9DOF to the under pads, solder RAW ESP-8266's to adapter boards. For practice I put an ATTINY 85 onto an adapter board - but never tested it.Click image for larger version. 

Name:	SolderPasted.PNG 
Views:	84 
Size:	748.7 KB 
ID:	6932 The picture shows some of Franks connector board and one of the SMD Caps and some 30ga Wire wrap wire in place. I used this Connector board to connect to ALT Serial2 pins and it worked of course to talk to the ESP as the early version was wired to Serial3.

    <edit> I posted this elsewhere - I used the paste to fix this USB Flash drive that was kicked pulling up and cracking the PCB traces - the paste spread easily and melted fast.
    Last edited by defragster; 04-06-2016 at 03:40 AM. Reason: proper details

  13. #38
    Senior Member fms1961's Avatar
    Join Date
    Jul 2015
    Location
    Northern Germany
    Posts
    153
    Frank: I've bought this oven some month ago: https://www.beta-estore.com/rkuk/ord...html?wg=1&p=13 - perhaps I should give it a try and solder some of your boards ...

  14. #39
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,659
    I've done a speedtest and compared the speed of SerialFlash to ParallelFlash.

    I loaded a 2.5 MB File to the flash an wrote a short sketch to read that file (F_CPU = 120MHz, GCC 5.3, -O2)

    Parallel:
    Code:
    Read 2572956 Bytes in 628 Milliseconds = 3.907264 Megabyte / Sec
    Serial:
    Code:
    2572956 Bytes in 1531 Milliseconds = 1.602718 Megabyte / Sec
    The SerialFlash.h is a bit unoptimized...
    Attached Files Attached Files
    Last edited by Frank B; 04-16-2016 at 11:46 AM. Reason: Added sketches

  15. #40
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,659
    Quote Originally Posted by fms1961 View Post
    Frank: I've bought this oven some month ago: https://www.beta-estore.com/rkuk/ord...html?wg=1&p=13 - perhaps I should give it a try and solder some of your boards ...
    I've a new one.. let me test it first
    It hase more space for the SD-Slot on the display.

  16. #41
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,659
    Quote Originally Posted by Frank B View Post
    I've done a speedtest and compared the speed of SerialFlash to ParallelFlash.
    Parallel:
    Code:
    Read 2572956 Bytes in 628 Milliseconds = 3.907264 Megabyte / Sec
    Nope. I did some simple changes.. now 1MB/S more: 4.8 Megabyte / Sec. @ 120MHz.

    Edit:
    Code:
    2572956 Bytes in 450 Milliseconds = 5.452805 Megabyte / Sec
    Last edited by Frank B; 04-16-2016 at 10:56 PM.

  17. #42
    Senior Member fms1961's Avatar
    Join Date
    Jul 2015
    Location
    Northern Germany
    Posts
    153
    A quick question aside - as the development of the editor is frozen a little because the lack of time on my side, I wonder, if someone might know about the tool "PaintCode" für the Mac (for Swift, Objective C or C#) which also allows to generate GUI elements and export them as drawing routines in code or SVG.

    Click image for larger version. 

Name:	Screenshot 2016-04-21 11.39.34.png 
Views:	64 
Size:	299.3 KB 
ID:	7009
    Last edited by fms1961; 04-21-2016 at 09:41 AM.

  18. #43
    Senior Member fms1961's Avatar
    Join Date
    Jul 2015
    Location
    Northern Germany
    Posts
    153
    I just added a little demo video I made this afternoon - no line of code was written, I took a knob SVG picture and animated it ... Very nice ... just look into my dropbox ...

  19. #44
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,659
    Oh, that looks good!
    But how to display the SVG on a teensy ? (Is there a lib we could try to port..?) Or do you convert it to an other format ?

  20. #45
    Senior Member fms1961's Avatar
    Join Date
    Jul 2015
    Location
    Northern Germany
    Posts
    153
    We are not the first thinking in that direction: Transcompile Arduio TFT GUI Sketch from SVG File

    PaintCode adds the transformation/transition functionality, so I think a reparsing of the generated source will be the fastest way.

  21. #46
    Senior Member fms1961's Avatar
    Join Date
    Jul 2015
    Location
    Northern Germany
    Posts
    153
    Hm ... it's silent in this thread, so I'm asking myself if this little "project" is worth looking into and adding some more effort, or will it just "dry out" because of the lack of interest?

    So my questions are:

    - is there an interest in such an own HMI display solution?
    - must we write the editor complete by ourselves?
    - or may we use (commercial) toosl liek code paint, which will lower the effort a lot?

    Perhaps now this will start a more lively discussion ... because I believe we all have a only little time to share, so it would be nice to use this resource wisely ... and not for some hardware or code no one is interested in.

  22. #47
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,442
    I was already wondering about the silence in this thread but I assumed that things were well progressing in the background.

    I'm actually under pressure to show a prototype of my current development mid-July, so I decided to go with the itead HMI solution for the moment, but it's a real pain in the ass. Thus I'm really looking forward to having a Teensy based HMI solution.

    If using third-party tools like codePaint directly or as a base for an own optimized SVG2Code parser might at least partly prevent from re-inventing the wheel, I'm not against that and if there was an initial financial investment, I'd be happy to contribute. The only problem I see is that the passive GUI design can obviously be parsed from an SVG, but what about interaction like touchable elements which would send parametrable event code back?

  23. #48
    Senior Member
    Join Date
    Oct 2013
    Location
    Rogersville MO
    Posts
    253
    Currently building an HMI on a Raspi ( to control a teensy with audio board ) using QT. Having stuck my toe in that pond I am finding it quite cold, the process on the Raspi is to just use the .ui file and parse that through a python post processor to generate python code, would something similar work teensy native?

  24. #49
    Senior Member fms1961's Avatar
    Join Date
    Jul 2015
    Location
    Northern Germany
    Posts
    153
    Quote Originally Posted by cartere View Post
    would something similar work teensy native?
    If you read carefully all the posts concerning this theme (ok, they are a little scattered around in the forums themes ...) you will find out: that's just our goal!

  25. #50
    Senior Member
    Join Date
    Oct 2013
    Location
    Rogersville MO
    Posts
    253
    The thought was to use the QT ui designer as the front end tool, parse that ( I think the output from QT is XML ), upload the resulting ( code, description file,....?) to the teensy HMI board. Sorry for the way I think ( express myself ), lots getting lost through the language barrier

    The workflow would be design the HMI in QT Creator, parse the *.ui file, upload result to teensy HMI board.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •