Browse Search Popular Register Upload Rules User list Login:
Search:
7seg display v3

Image:
screenshot of the scene

Author: The Linkage

Group: Technical

Filesize: 30.15 kB

Date added: 2019-05-19

Rating: 6.1

Downloads: 1403

Views: 261

Comments: 3

Ratings: 3

Times favored: 0

Made with: Algodoo v2.1.0

Tags:

Scene tag

TL/DR: 7segment display that is less laggy than others, if used with a low refresh rate (say, 10fps).

----------------------------------------------------
-------------------------------------------------------------
-------------------
my take on the 7segment, done entirely with entityByGeomID calls. This makes it so that every screen refresh is more CPU intensive than a normal 7seg made with tons of variables, but it idles completely when not refreshing (i.e. zero code runs when the number is static) making it lag-less between refreshes.

It is a complete mess... :lol:

Only supports positive numbers for now, but it can accept ints and floats. might make it support negatives later.

To reduce the number of displays (i.e. make it a 2 digit screen) delete the digits from the RIGHT, and then modify the variable "_amountOfDisplays" in the dark red box.

You can hide the fixjoints if you want, they are barely visible to show how the thing works.



To write to it, you have to call _writeToDisplay(n) where n is the number you want to write. so, from a laser it'd be

onHitByLaser = (e)=>{ e.geom.writeToDisplay(12.34) }

or, if you prefer suffering and want to use the same lagless transfer method, it's a little bit more complicated - with an axle's (or fixjoint's) onSpawn, write the dark red box geomID to the object from which you want to control the screen, then use entityByGeomID sporadically to write stuff to the screen


----------------------------------------------------
-------------------------------------------------------------
-------------------

Fixed some edge cases (ints ending in one or more zeros)
Got rid of some unused local vars and leftover debugging stuff

Now displays negative values too
Last edited at 2019/07/08 15:27:40 by The Linkage
Please log in to rate this scene
edit
Similar scenes
Title: Laser 7seg display Beta
Rating: 5
Filesize: 489.57 kB
Downloads: 493
Comments: 0
Ratings: 1
Date added: 2009/09/03 19:45:48
Made with: Algodoo before v1.8.5
Rating: rated 5
download
Title: LCD Display
Rating: 5
Filesize: 71.64 kB
Downloads: 460
Comments: 0
Ratings: 1
Date added: 2012/06/04 11:20:53
Made with: Algodoo v2.0.1 Edu
Rating: rated 5
download
Title: 4'3 12Pixel Display with demo tape
Rating: 5
Filesize: 52.28 kB
Downloads: 422
Comments: 0
Ratings: 1
Date added: 2018/05/05 15:07:40
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: Text display
Rating: 5
Filesize: 32.21 kB
Downloads: 508
Comments: 6
Ratings: 1
Date added: 2014/04/26 04:36:10
Made with: Algodoo v2.1.0
Rating: rated 5
download
Title: SCANNING SEVEN SEGMENT DISPLAY
Rating: 5.6667
Filesize: 18.82 kB
Downloads: 571
Comments: 7
Ratings: 3
Date added: 2013/06/19 23:53:26
Made with: Algodoo v2.1.0
Rating: rated 5.7
download
Title: 168558_Gear_7_9-segment display
Rating: 5.1111
Filesize: 44.05 kB
Downloads: 550
Comments: 2
Ratings: 3
Date added: 2017/09/12 19:12:55
Made with: Algodoo v2.1.0
Rating: rated 5.1
download
_writeToDisplay(1000) displays 1
it's fixed. Do tell me if you find any other error
Cool! :tup: