[Mod] Digilines [digilines]
- rubenwardy
- Moderator
- Posts: 6972
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: [Mod] Digilines [minetest-mod-digilines]
You can't make a terminal using minetest without the ability to send key presses, terminals aren't just typing commands.
- benrob0329
- Member
- Posts: 1341
- Joined: Thu Aug 06, 2015 22:39
- GitHub: Benrob0329
- IRC: benrob0329
- In-game: benrob03
- Location: Michigan
- Contact:
Re: [Mod] Digilines [minetest-mod-digilines]
you could use the keyboard from the digilines-stuff modpack, and only send one letter.
-
- Member
- Posts: 1084
- Joined: Sat Apr 18, 2015 15:50
- IRC: poke
- In-game: poke
- Location: Somewhere in the Universe, on a weird planet called Earth/
Re: [Mod] Digilines [minetest-mod-digilines]
Noho. I mean: You must rightclick on the tv to see what happens in the studio.
ARE YOU A NYAN CAT?????
--ABJ
--ABJ
-
- Member
- Posts: 1084
- Joined: Sat Apr 18, 2015 15:50
- IRC: poke
- In-game: poke
- Location: Somewhere in the Universe, on a weird planet called Earth/
Re: [Mod] Digilines [minetest-mod-digilines]
And the camera can have eyes by letting the minetest engine think that a player is stuck in there, and send the view of the cam to the formspec/gui of the TV's that are connected. And well, if not possible, i want radio. (explained later)
ARE YOU A NYAN CAT?????
--ABJ
--ABJ
-
- Member
- Posts: 1084
- Joined: Sat Apr 18, 2015 15:50
- IRC: poke
- In-game: poke
- Location: Somewhere in the Universe, on a weird planet called Earth/
Re: [Mod] Digilines [minetest-mod-digilines]
And: What is wrong with a GUI / formspec?
ARE YOU A NYAN CAT?????
--ABJ
--ABJ
Re: [Mod] Digilines [minetest-mod-digilines]
I've proposed a change to make digilines a mod instead of a modpack. Testers needed, would appreciate someone testing it.
https://github.com/minetest-mods/digilines/pull/32
https://github.com/minetest-mods/digilines/pull/32
-
- Member
- Posts: 818
- Joined: Tue Apr 14, 2015 01:59
- GitHub: raymoo
- IRC: Hijiri
- In-game: Raymoo + Clownpiece
Re: [Mod] Digilines [minetest-mod-digilines]
Is the name of internal.lua meant to imply that the functions defined within should not be used by modders?
EDIT: Nevermind. Can I find the API for creating your own digiline hardware documented anywhere? Specifically I am looking for node_def.digiline.receptor, the rules parameter of receptor_send, and the msg parameter (what values are allowed). I would also like to know whether sent messages are automatically delayed until the next tick (to prevent infinite loops) or if that must be done manually by receiving or sending nodes.
EDIT: Nevermind. Can I find the API for creating your own digiline hardware documented anywhere? Specifically I am looking for node_def.digiline.receptor, the rules parameter of receptor_send, and the msg parameter (what values are allowed). I would also like to know whether sent messages are automatically delayed until the next tick (to prevent infinite loops) or if that must be done manually by receiving or sending nodes.
Every time a mod API is left undocumented, a koala dies.
- ulla
- Member
- Posts: 142
- Joined: Wed Feb 04, 2015 09:22
- GitHub: IIIullaIII
- IRC: ulla
- In-game: ulla
Re: [Mod] Digilines [minetest-mod-digilines]
Hello, I need a little help, I created a LCD bigger than that of DIGILINE mod, twice as high, I used a mesh, I can write about it, the problem is that even having set the right collision_box and selection_box, I can not write in the upper part. I tried to increase the height of the text, but instead of being displayed in the upper part of the mesh, the sentence is cut, you can help me understand how to do? thanks in advance
(PS: I simply modified lcd.lua original)
(PS: I simply modified lcd.lua original)
X4cna2d4UqsiawIzUumDgPoYNx3JLGII
- rubenwardy
- Moderator
- Posts: 6972
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: [Mod] Digilines [minetest-mod-digilines]
Please may you rename the topic to:
[Mod] Digilines [digilines]
minetest-mod-digilines is not the correct name
[Mod] Digilines [digilines]
minetest-mod-digilines is not the correct name
-
- New member
- Posts: 3
- Joined: Wed Apr 12, 2017 18:09
- GitHub: Brackstons
- IRC: Brackston
- In-game: Brackston
Re: [Mod] Digilines [minetest-mod-digilines]
Tic Tac Toe "fix" post moved to
viewtopic.php?f=9&t=5113&p=283827
viewtopic.php?f=9&t=5113&p=283827
- TalkLounge
- Member
- Posts: 324
- Joined: Sun Mar 26, 2017 12:42
- GitHub: TalkLounge
- In-game: TalkLounge
- Location: Germany
Re: [Mod] Digilines [minetest-mod-digilines]
Some errors crashes my server(0.4.15) the hole time:
If I teleport to this position theres only stone and dirt.
Code: Select all
2017-12-27 15:05:31: WARNING[Server]: ServerEnv: Trying to store id = 2770 statically but block (645,0,-610) already contains 100 objects. Forcing delete.
2017-12-27 15:05:33: WARNING[Server]: ServerEnv: Trying to store id = 2775 statically but block (645,0,-610) already contains 100 objects. Forcing delete.
2017-12-27 15:05:33: WARNING[Server]: ServerEnv: Trying to store id = 2774 statically but block (645,0,-610) already contains 100 objects. Forcing delete.
2017-12-27 15:05:34: ERROR[Server]: Server::ProcessData(): Canceling: No player for peer_id=3 disconnecting peer!
2017-12-27 15:05:35: WARNING[Server]: ServerEnv: Trying to store id = 2779 statically but block (645,0,-610) already contains 100 objects. Forcing delete.
2017-12-27 15:05:35: WARNING[Server]: ServerEnv: Trying to store id = 2778 statically but block (645,0,-610) already contains 100 objects. Forcing delete.
2017-12-27 15:05:37: WARNING[Server]: ServerEnv: Trying to store id = 2783 statically but block (645,0,-610) already contains 100 objects. Forcing delete.
2017-12-27 15:05:37: WARNING[Server]: ServerEnv: Trying to store id = 2782 statically but block (645,0,-610) already contains 100 objects. Forcing delete.
2017-12-27 15:05:39: WARNING[Server]: ServerEnv: Trying to store id = 2787 statically but block (645,0,-610) already contains 100 objects. Forcing delete.
2017-12-27 15:05:39: WARNING[Server]: ServerEnv: Trying to store id = 2786 statically but block (645,0,-610) already contains 100 objects. Forcing delete.
2017-12-27 15:05:39: WARNING[Server]: ServerEnv: Trying to store id = 2785 statically but block (645,0,-610) already contains 100 objects. Forcing delete.
2017-12-27 15:05:39: WARNING[Server]: ServerEnv: Trying to store id = 2784 statically but block (645,0,-610) already contains 100 objects. Forcing delete.
2017-12-27 15:05:41: ERROR[Server]: ServerEnvironment::deactivateFarObjects(): id=2791 m_static_exists=true but static data doesn't actually exist in (645,0,-610)
2017-12-27 15:05:41: WARNING[Server]: StaticObjectList::remove(): id=2791 not found
2017-12-27 15:05:41: WARNING[Server]: ServerEnv: Trying to store id = 2791 statically but block (645,0,-610) already contains 104 objects. Forcing delete.
2017-12-27 15:05:41: ERROR[Server]: ServerEnvironment::deactivateFarObjects(): id=2790 m_static_exists=true but static data doesn't actually exist in (645,0,-610)
2017-12-27 15:05:41: WARNING[Server]: StaticObjectList::remove(): id=2790 not found
2017-12-27 15:05:41: WARNING[Server]: ServerEnv: Trying to store id = 2790 statically but block (645,0,-610) already contains 104 objects. Forcing delete.
2017-12-27 15:05:41: ERROR[Server]: ServerEnvironment::deactivateFarObjects(): id=2789 m_static_exists=true but static data doesn't actually exist in (645,0,-610)
2017-12-27 15:05:41: WARNING[Server]: StaticObjectList::remove(): id=2789 not found
2017-12-27 15:05:41: WARNING[Server]: ServerEnv: Trying to store id = 2789 statically but block (645,0,-610) already contains 104 objects. Forcing delete.
2017-12-27 15:05:41: ERROR[Server]: ServerEnvironment::deactivateFarObjects(): id=2788 m_static_exists=true but static data doesn't actually exist in (645,0,-610)
2017-12-27 15:05:41: WARNING[Server]: StaticObjectList::remove(): id=2788 not found
2017-12-27 15:05:41: WARNING[Server]: ServerEnv: Trying to store id = 2788 statically but block (645,0,-610) already contains 104 objects. Forcing delete.
2017-12-27 15:05:43: WARNING[Server]: ServerEnv: Trying to store id = 2793 statically but block (645,0,-610) already contains 104 objects. Forcing delete.
2017-12-27 15:05:43: WARNING[Server]: ServerEnv: Trying to store id = 2792 statically but block (645,0,-610) already contains 104 objects. Forcing delete.
Subgames Server: Sky World Subgames German Survival Server: Wildes Land 2 E-Mail: talklounge@yahoo.de
- joe7575
- Member
- Posts: 851
- Joined: Mon Apr 24, 2017 20:38
- GitHub: joe7575
- In-game: JoSto wuffi
- Location: Germany, in the deep south
Re: [Mod] Digilines [digilines]
Blocks in this case are real blocks (16x16x16 nodes).
You have to teleport to 10320,0,-9760.
I had similar errors on my server. In my case it was a problem with Pedestals. After replacing them, it was ok.
You have to teleport to 10320,0,-9760.
I had similar errors on my server. In my case it was a problem with Pedestals. After replacing them, it was ok.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.
Re: [Mod] Digilines [digilines]
I connected a luacontroller with digilines to a LCD, a RTC and a lightsensor and used the following to test the LCD:
But I get the following error in the editor:
What's wrong?
*EDIT:*
I pulled mesecons from the github master branch, which seems to have problems with my configuration.
With the 2017.03.05 Release package all is well, so problem solved.
Code: Select all
digiline_send("LCD", "Hello, World!")
Code: Select all
(load):1: attempt to call global 'digiline_send' (a nil value)
*EDIT:*
I pulled mesecons from the github master branch, which seems to have problems with my configuration.
With the 2017.03.05 Release package all is well, so problem solved.
- sparky
- Member
- Posts: 154
- Joined: Sun Oct 05, 2014 00:54
- GitHub: Elkien3
- IRC: ircSparky
- In-game: sparky
- Location: USA
- Contact:
Re: [Mod] Digilines [digilines]
Would it be possible to make it so you can digiline_send on a specific pin?
(I mean, without redoing a lot of code)
This would be useful if you wanted to make multiple computers in different houses connected, but only want the shared digiline to send messages from one computer to the other, not things that only matter to the individual computer. such as setting an LCD screen's text or sending "GET" to an RTC.
(I mean, without redoing a lot of code)
This would be useful if you wanted to make multiple computers in different houses connected, but only want the shared digiline to send messages from one computer to the other, not things that only matter to the individual computer. such as setting an LCD screen's text or sending "GET" to an RTC.
Re: [Mod] Digilines [digilines]
One thing I'd like to see is turning on "conductive" property for ordinary blocks. In other words one could build circuits into the walls of any ordinary object without it coming annoyingly visible (or requiring extra wire space.
One might suggest a Recipe of any standard block mixed with a conductive wire resulting in a conductive block which doesn't look any different (than perhaps some identifying green dot added to each face).
without requiring extra space or without having to mess up the looks of ordinary objects that one could build thin and mostly hidden circuits into any project. E.G. I've been building aircraft and if the exterior walls also conducted then I could easily fit lighting circuits into a small diameter hull. There are many other examples where using a block which didn't look different from the rest of the walls (except my green dot) would aide in the clean look of the object. Plus make it easier to contact the receiving block (such as a light block).
--prof.
One might suggest a Recipe of any standard block mixed with a conductive wire resulting in a conductive block which doesn't look any different (than perhaps some identifying green dot added to each face).
without requiring extra space or without having to mess up the looks of ordinary objects that one could build thin and mostly hidden circuits into any project. E.G. I've been building aircraft and if the exterior walls also conducted then I could easily fit lighting circuits into a small diameter hull. There are many other examples where using a block which didn't look different from the rest of the walls (except my green dot) would aide in the clean look of the object. Plus make it easier to contact the receiving block (such as a light block).
--prof.
-
- New member
- Posts: 6
- Joined: Sat Nov 24, 2018 18:45
- GitHub: tealethetoolman
- IRC: thetoolman
Re: [Mod] Digilines [digilines]
** EDIT: I found that someone has already fixed this and that there is a pull request waiting. can someone please handle the pull request? thanks**
hey all!
I've found a bit of an issue with inventory.lua and the way it reports items in chests to digilines.
i came up with 16 tests and got these results and I'm planning on working the code to fix this. To do these tests, I hooked up a digiline chest to a digiline to a lua controller that justs print(event.msg). theres actually 2 chests, a filter injector, and a pipe.
also, substituting default:dirt in my response strings for ITEM
Tests and results:
1. Insert single item in empty chest
put ITEM
put ITEM 1
uput ITEM
2. insert stack of items in empty chest
put ITEM 99
put ITEM 1
uput ITEM 99
3. insert single item into non-empty chest
put ITEM
put ITEM
put ITEM 1
uput ITEM
4. insert stack of items in non-empty chest
put ITEM 99
put ITEM 99
put ITEM 99
put ITEM 1
uput ITEM 99
5. take stack of items from chest so that it is not empty
utake item 99
6. take stack of items from chest so that it is empty
utake ITEM 99
empty
utake ITEM
7. take single item so that chest is not empty.
8. take single item so that chest is empty.
empty
utake ITEM
9. use single item injector to leave empty chest
10. use single item injector to leave chest not empty
utake item
11. use stack injector to leave empty chest
empty
utake item 99
12. use stack injector to leave chest not empty
utake item 99
13. use stack injector to put item into an empty chest
put item 99
14. use stack injector to put item into a non empty chest
15. use single item injector to put item into empty chest
put item
16. use single injector to put item into a non-empty chest
put item 99
so it looks like i need to do a few tests still (14,9,7) but we can all clearly see here that there is a problem. I first noticed this a few months back when i was trying to make a mass storage device that kept track of the quantities in the chests, but my counts were always off. here we can see why.
Also, I found that in the mesecons_luacontroller/init.lua, you can add the string function split to the environment for the lua controller. this makes it so that you can grab these values and work with them. example
uput default:dirt 99
action=event.msg.split(" ")[1]
item=event.msg.split(" ")[2]
quantity=event.msg.split(" ")[3]
so question for these changes i will try to make to this inventory.lua digilines reporting functionality, is anyone actually using this broken of an item and if so, how are you using it? workarounds like a digiline detector tube (which will multicount on a full chest btw)?
hey all!
I've found a bit of an issue with inventory.lua and the way it reports items in chests to digilines.
i came up with 16 tests and got these results and I'm planning on working the code to fix this. To do these tests, I hooked up a digiline chest to a digiline to a lua controller that justs print(event.msg). theres actually 2 chests, a filter injector, and a pipe.
also, substituting default:dirt in my response strings for ITEM
Tests and results:
1. Insert single item in empty chest
put ITEM
put ITEM 1
uput ITEM
2. insert stack of items in empty chest
put ITEM 99
put ITEM 1
uput ITEM 99
3. insert single item into non-empty chest
put ITEM
put ITEM
put ITEM 1
uput ITEM
4. insert stack of items in non-empty chest
put ITEM 99
put ITEM 99
put ITEM 99
put ITEM 1
uput ITEM 99
5. take stack of items from chest so that it is not empty
utake item 99
6. take stack of items from chest so that it is empty
utake ITEM 99
empty
utake ITEM
7. take single item so that chest is not empty.
8. take single item so that chest is empty.
empty
utake ITEM
9. use single item injector to leave empty chest
10. use single item injector to leave chest not empty
utake item
11. use stack injector to leave empty chest
empty
utake item 99
12. use stack injector to leave chest not empty
utake item 99
13. use stack injector to put item into an empty chest
put item 99
14. use stack injector to put item into a non empty chest
15. use single item injector to put item into empty chest
put item
16. use single injector to put item into a non-empty chest
put item 99
so it looks like i need to do a few tests still (14,9,7) but we can all clearly see here that there is a problem. I first noticed this a few months back when i was trying to make a mass storage device that kept track of the quantities in the chests, but my counts were always off. here we can see why.
Also, I found that in the mesecons_luacontroller/init.lua, you can add the string function split to the environment for the lua controller. this makes it so that you can grab these values and work with them. example
uput default:dirt 99
action=event.msg.split(" ")[1]
item=event.msg.split(" ")[2]
quantity=event.msg.split(" ")[3]
so question for these changes i will try to make to this inventory.lua digilines reporting functionality, is anyone actually using this broken of an item and if so, how are you using it? workarounds like a digiline detector tube (which will multicount on a full chest btw)?
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: [Mod] Digilines [digilines]
Can you check the status of the led marque?
Re: [Mod] Digilines [digilines]
EDIT: Opended issue in github: https://github.com/minetest-mods/mesecons/issues/467
I had the same problem a couple of days ago (digilines is installed)...
-------------------
In mesecons/mesecons_luacontroller/init.lua (https://github.com/minetest-mods/meseco ... t.lua#L396)
-------------------
And in digilines/init.lua (https://github.com/minetest-mods/digili ... nit.lua#L2)
-------------------
The ultimate fix to get it working again (which assumes that digilines is installed and enabled)
was to comment-out the check to minetest.global_exists("digilines") in the luacontroller.
The reason why the 2017.03.05 release works (and is broken in commit [Limit and optimize digiline_send (#379)] https://github.com/minetest-mods/meseco ... e79745090e)
is because the 2017 version does not use global_exists and instead uses
But that has issues where if digilines wasn't installed the luacontroller would throw errors about 'digiline' being a nil value -- that is why
the change was made in 2b096f0, global_exists will return a boolean (false if nil, true if exists).
PS: I should probably open a new issue for mesecons_luacontroller in the github project: https://github.com/minetest-mods/mesecons/issues
And report this problem.
Ismoor wrote:I connected a luacontroller with digilines to a LCD, a RTC and a lightsensor and used the following to test the LCD:But I get the following error in the editor:Code: Select all
digiline_send("LCD", "Hello, World!")
What's wrong?Code: Select all
(load):1: attempt to call global 'digiline_send' (a nil value)
*EDIT:*
I pulled mesecons from the github master branch, which seems to have problems with my configuration.
With the 2017.03.05 Release package all is well, so problem solved.
I had the same problem a couple of days ago (digilines is installed)...
-------------------
In mesecons/mesecons_luacontroller/init.lua (https://github.com/minetest-mods/meseco ... t.lua#L396)
Code: Select all
local function get_digiline_send(pos, itbl, send_warning)
if not minetest.global_exists("digilines") then return end
[...]
And in digilines/init.lua (https://github.com/minetest-mods/digili ... nit.lua#L2)
Code: Select all
digilines = {}
[...]
The ultimate fix to get it working again (which assumes that digilines is installed and enabled)
was to comment-out the check to minetest.global_exists("digilines") in the luacontroller.
The reason why the 2017.03.05 release works (and is broken in commit [Limit and optimize digiline_send (#379)] https://github.com/minetest-mods/meseco ... e79745090e)
is because the 2017 version does not use global_exists and instead uses
Code: Select all
if not digiline then return end
the change was made in 2b096f0, global_exists will return a boolean (false if nil, true if exists).
PS: I should probably open a new issue for mesecons_luacontroller in the github project: https://github.com/minetest-mods/mesecons/issues
And report this problem.
- Desour
- Member
- Posts: 1469
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: [Mod] Digilines [digilines]
Ask here: viewtopic.php?t=20651Miniontoby wrote:Can you check the status of the led marque?
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: [Mod] Digilines [digilines]
I try to make a working analog clock in minetest with digilines, digistuff and led marquee (led marquee isn't the problem) but it doesn't work
If you would like to see the design, what there is happening and what I did tried in 25 minutes watch the video
https://drive.google.com/file/d/1ZVdk33 ... sp=sharing
Here is the code
Please help me
If you would like to see the design, what there is happening and what I did tried in 25 minutes watch the video
https://drive.google.com/file/d/1ZVdk33 ... sp=sharing
Here is the code
Code: Select all
-- time to screen script
if event.channel == "t" then
if event.msg == "1" then
digiline_send("1","allon")
elseif event.msg == "2" then
digiline_send("2","allon")
elseif event.msg == "3" then
digiline_send("3","allon")
elseif event.msg == "4" then
digiline_send("4","allon")
elseif event.msg == "5" then
digiline_send("5","allon")
elseif event.msg == "6" then
digiline_send("6","allon")
elseif event.msg == "7" then
digiline_send("7","allon")
elseif event.msg == "8" then
digiline_send("8","allon")
elseif event.msg == "9" then
digiline_send("9","allon")
elseif event.msg == "10" then
digiline_send("10","allon")
elseif event.msg == "11" then
digiline_send("11","allon")
elseif event.msg == "12" then
digiline_send("12","allon")
elseif event.msg == "13" then
digiline_send("1","allon")
elseif event.msg == "14" then
digiline_send("2","allon")
elseif event.msg == "15" then
digiline_send("3","allon")
elseif event.msg == "16" then
digiline_send("4","allon")
elseif event.msg == "17" then
digiline_send("5","allon")
elseif event.msg == "18" then
digiline_send("6","allon")
elseif event.msg == "19" then
digiline_send("7","allon")
elseif event.msg == "20" then
digiline_send("8","allon")
elseif event.msg == "21" then
digiline_send("9","allon")
elseif event.msg == "22" then
digiline_send("10","allon")
elseif event.msg == "23" then
digiline_send("11","allon")
elseif event.msg == "24" then
digiline_send("12","allon")
end
end
-- Clock (RTC) output to hour and minute script
if event.channel == "clock" then
time = event.msg * 24
hour = math.floor(time)
time = (time % 1) * 60
minute = math.floor(time)
digiline_send("hour", hour)
digiline_send("t", hour)
digiline_send("minute", minute)
end
Re: [Mod] Digilines [digilines]
You can probably reduce that code into a simplified form as follows (which should also help with the controller burning:Miniontoby wrote:I try to make a working analog clock in minetest with digilines, digistuff and led marquee (led marquee isn't the problem) but it doesn't work
If you would like to see the design, what there is happening and what I did tried in 25 minutes watch the video
https://drive.google.com/file/d/1ZVdk33 ... sp=sharing
Here is the codePlease help meCode: Select all
-- time to screen script if event.channel == "t" then if event.msg == "1" then digiline_send("1","allon") elseif event.msg == "2" then digiline_send("2","allon") elseif event.msg == "3" then digiline_send("3","allon") elseif event.msg == "4" then digiline_send("4","allon") elseif event.msg == "5" then digiline_send("5","allon") elseif event.msg == "6" then digiline_send("6","allon") elseif event.msg == "7" then digiline_send("7","allon") elseif event.msg == "8" then digiline_send("8","allon") elseif event.msg == "9" then digiline_send("9","allon") elseif event.msg == "10" then digiline_send("10","allon") elseif event.msg == "11" then digiline_send("11","allon") elseif event.msg == "12" then digiline_send("12","allon") elseif event.msg == "13" then digiline_send("1","allon") elseif event.msg == "14" then digiline_send("2","allon") elseif event.msg == "15" then digiline_send("3","allon") elseif event.msg == "16" then digiline_send("4","allon") elseif event.msg == "17" then digiline_send("5","allon") elseif event.msg == "18" then digiline_send("6","allon") elseif event.msg == "19" then digiline_send("7","allon") elseif event.msg == "20" then digiline_send("8","allon") elseif event.msg == "21" then digiline_send("9","allon") elseif event.msg == "22" then digiline_send("10","allon") elseif event.msg == "23" then digiline_send("11","allon") elseif event.msg == "24" then digiline_send("12","allon") end end -- Clock (RTC) output to hour and minute script if event.channel == "clock" then time = event.msg * 24 hour = math.floor(time) time = (time % 1) * 60 minute = math.floor(time) digiline_send("hour", hour) digiline_send("t", hour) digiline_send("minute", minute) end
NOTE: every call to digiline_send results in the script being re-executed and can cause either an infinite loop or cause the controller's script to be executed too many times -- both of which result in the controller burning up to protect server performance and resources .
The only solution is to make sure that digline_send isn't being called, too, often.
For instance you don't need to send and event on channel "t" in response to an incoming event on the "clock" channel -- just use the clock channel to set everything up (this is done in the below example).
PS: you can read-up on the luacontroller's documentation here: http://mesecons.net/luacontroller/
Make sure to read these parts:
- Chapter VI: Memory
- Chapter VII: Overheating
Code: Select all
-- time to screen script
local HOUR_CHANNEL = "hour"
local MINUTE_CHANNEL = "minute"
local ALLON = "allon"
local function init_mem()
if mem.hour == nil then mem.hour=0 end
if mem.minute == nil then mem.minute=0 end
end
local function send_hour()
-- the channel for this is the hour "1", "2", etc
digiline_send(tostring(mem.hour),ALLON)
-- this just sends the hour
digiline_send(HOUR_CHANNEL,tostring(mem.hour)
end
local function send_minute()
digiline_send(MINUTE_CHANNEL,tostring(mem.minute))
end
-- initialize memory varibles (they will be created and remain until controller is burned or dug)
init_mem()
if event.type == "digiline"
if event.channel ~= "clock" then
return -- no need to continue executing this script, on the wrong channel
end
if event.channel == "clock" then
-- Clock (RTC) output to hour and minute script
local old_hour = mem.hour
local old_minute = mem.minute
local new_time = tonumber(event.msg) * 24
-- hour is 0 to 11 (1 to 12)
mem.hour = (math.floor(new_time) % 12) + 1
-- minute is the remainder * 60
mem.minute = math.floor((new_time % 1) * 60 )
-- only need to call digiline_send once to set the value, as it will remain on the end-point device until it is changed again.
if old_hour ~= hour then
send_hour() -- send only if hour has changed
end
if old_minute ~= minute then
send_minute() -- send only if minute has changed
end
end
end
- ulla
- Member
- Posts: 142
- Joined: Wed Feb 04, 2015 09:22
- GitHub: IIIullaIII
- IRC: ulla
- In-game: ulla
Re: [Mod] Digilines [digilines]
Code: Select all
-- time to screen script
local HOUR_CHANNEL = "hour"
local MINUTE_CHANNEL = "minute"
local ALLON = "allon"
local function init_mem()
if mem.hour == nil then mem.hour=0 end
if mem.minute == nil then mem.minute=0 end
end
local function send_hour()
-- the channel for this is the hour "1", "2", etc
digiline_send(tostring(mem.hour),ALLON)
-- this just sends the hour
digiline_send(HOUR_CHANNEL,tostring(mem.hour))
end
local function send_minute()
digiline_send(MINUTE_CHANNEL,tostring(mem.minute))
end
-- initialize memory varibles (they will be created and remain until controller is burned or dug)
init_mem()
if event.type == "digiline" then
if event.channel ~= "clock" then
return -- no need to continue executing this script, on the wrong channel
end
if event.channel == "clock" then
-- Clock (RTC) output to hour and minute script
local old_hour = mem.hour
local old_minute = mem.minute
local new_time = tonumber(event.msg) * 24
-- hour is 0 to 11 (1 to 12)
mem.hour = (math.floor(new_time) % 12) + 1
-- minute is the remainder * 60
mem.minute = math.floor((new_time % 1) * 60 )
-- only need to call digiline_send once to set the value, as it will remain on the end-point device until it is changed again.
if old_hour ~= hour then
send_hour() -- send only if hour has changed
end
if old_minute ~= minute then
send_minute() -- send only if minute has changed
end
end
end
line 18 added )
and line 29 added then
:-P
X4cna2d4UqsiawIzUumDgPoYNx3JLGII
- ulla
- Member
- Posts: 142
- Joined: Wed Feb 04, 2015 09:22
- GitHub: IIIullaIII
- IRC: ulla
- In-game: ulla
Re: [Mod] Digilines [digilines]
need add clear cmdMiniontoby wrote:I try to make a working analog clock in minetest with digilines, digistuff and led marquee (led marquee isn't the problem) but it doesn't work
If you would like to see the design, what there is happening and what I did tried in 25 minutes watch the video
https://drive.google.com/file/d/1ZVdk33 ... sp=sharing
Here is the codePlease help meCode: Select all
-- time to screen script if event.channel == "t" then if event.msg == "1" then digiline_send("allon", "clear") digiline_send("allon","1") elseif event.msg == "2" then digiline_send("allon", "clear") digiline_send("allon","2") elseif event.msg == "3" then digiline_send("allon", "clear") digiline_send("allon","3") elseif ............
but is better in this mode
- __1 __put in luacontroller and connect one blinky_plant
Code: Select all
if event.type == "on" then digiline_send("clock", "GET") end
__2__ connect rtc and assign "clock" how channel
__3__ connect rtc whit one other lua controller and put this :__4__connect the luacontroller whit 4 led or 4 lcd and assign channel lop pol olp plo and workCode: Select all
if event.channel == "clock" then time = event.msg * 24 hour = math.floor(time) tenhour, hour = math.floor(hour / 10), hour % 10 time = (time % 1) * 60 minute = math.floor(time) tenminute, minute = math.floor(minute / 10), minute % 10 digiline_send("lop", tenhour) digiline_send("pol", hour) digiline_send("olp", tenminute) digiline_send("plo", minute) end
if use 4 led connect from last to first if you place them near
X4cna2d4UqsiawIzUumDgPoYNx3JLGII
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: [Mod] Digilines [digilines]
__1__ The blinky-plant overheat the lua-controllerulla wrote:need add clear cmdMiniontoby wrote:I try to make a working analog clock in minetest with digilines, digistuff and led marquee (led marquee isn't the problem) but it doesn't work
If you would like to see the design, what there is happening and what I did tried in 25 minutes watch the video
https://drive.google.com/file/d/1ZVdk33 ... sp=sharing
Here is the codePlease help meCode: Select all
-- time to screen script if event.channel == "t" then if event.msg == "1" then digiline_send("allon", "clear") digiline_send("allon","1") elseif event.msg == "2" then digiline_send("allon", "clear") digiline_send("allon","2") elseif event.msg == "3" then digiline_send("allon", "clear") digiline_send("allon","3") elseif ............
but is better in this mode
- __1 __put
in luacontroller and connect one blinky_plantCode: Select all
if event.type == "on" then digiline_send("clock", "GET") end
__2__ connect rtc and assign "clock" how channel
__3__ connect rtc whit one other lua controller and put this :__4__connect the luacontroller whit 4 led or 4 lcd and assign channel lop pol olp plo and workCode: Select all
if event.channel == "clock" then time = event.msg * 24 hour = math.floor(time) tenhour, hour = math.floor(hour / 10), hour % 10 time = (time % 1) * 60 minute = math.floor(time) tenminute, minute = math.floor(minute / 10), minute % 10 digiline_send("lop", tenhour) digiline_send("pol", hour) digiline_send("olp", tenminute) digiline_send("plo", minute) end
if use 4 led connect from last to first if you place them near
__2__ I did
__3__ I can try
But that I don't want
and p.s. "whit" needs to be "with"
Re: [Mod] Digilines [digilines]
Back in the first and second pages, you guys were asking for a crafting recipe. So here it is:
Digimese ore
Mese:M
Stone:S
Digiline:D
DSD
SMS
DSD
Digimese ore
Mese:M
Stone:S
Digiline:D
DSD
SMS
DSD
Who is online
Users browsing this forum: No registered users and 2 guests