[mod] Beduino Controller [beduino]

Post Reply
User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

[mod] Beduino Controller [beduino]

by joe7575 » Post

Beduino

A microcontroller for Minetest

Image

Beduino is a 16-bit microcontroller and development environment with editor, file system, compiler, assembler, and debugger, based on the mod vm16. The controller can be programmed in mC, a C like language.

Beside vm16, the mod has no dependencies. However, it comes with an I/O module for techpack and techage.

Support for other technology related games or mods is possible.

Browse on GitHub or download the code.

Further information Dependencies: vm16, optional: techage, tubelib

License: GNU AGPLv3
Last edited by joe7575 on Sat Jan 28, 2023 20:07, edited 3 times in total.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [mod] Beduino [beduino]

by joe7575 » Post

Beduino is fully integrated into the Mod Techage and can be used as an alternative to the Lua controller.

Further information about Beduino, the programming language and the techage commands can be found in the wiki
Attachments
screenshot_20220611_115954.png
screenshot_20220611_115954.png (80.19 KiB) Viewed 2448 times
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [mod] Beduino [beduino]

by joe7575 » Post

The video shows the use of the Beduino controller as lift/elevator controller for techage.
Attachments
screenshot_20220625_110932.png
screenshot_20220625_110932.png (500.05 KiB) Viewed 2307 times
Last edited by joe7575 on Sun Jul 10, 2022 18:45, edited 2 times in total.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [mod] Beduino [beduino]

by joe7575 » Post

Stopwatch Example

Example of a stopwatch with displays for the last 5 results and the top 5 results.


screenshot_20220710_122936.png
screenshot_20220710_122936.png (126.88 KiB) Viewed 2213 times
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [mod] Beduino [beduino]

by joe7575 » Post

To be or not to Be-duino: That is the question!
beduino.gif
beduino.gif (355.44 KiB) Viewed 1838 times
The code for this demo:

Code: Select all

import "sys/stdlib.asm"
import "lib/seg14.c"

func init() {
}

func loop() {
  seg14_putstr(0, "TO BE OR NOT TO BEDUINO ");
  sleep(20);
  seg14_putstr(0, "  THAT IS THE QUESTION  ");
  sleep(20);
}
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
snoopy
Member
Posts: 263
Joined: Thu Oct 20, 2016 16:49
Location: DE, European Union

Re: [mod] Beduino [beduino]

by snoopy » Post

Hi,

I wondered if to find a MT mod NPC for the desert biomes like a Bedouin but found this...
joe7575 wrote:
Thu Jan 05, 2023 17:02
To be or not to Be-duino: That is the question!
Hilarious.

Have fun.
Last edited by snoopy on Mon Jan 30, 2023 07:46, edited 1 time in total.

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [mod] Beduino Controller [beduino]

by joe7575 » Post

LOL, no Beduino is a microcontroller mod and has nothing to do with desserts.

The name is a nod to Arduino controllers
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [mod] Beduino Controller [beduino]

by joe7575 » Post

Beduino has reached V1 with many updates and improvements

One example is the IOT sensor.
An IOT sensor that can be programmed like the Beduino controller to monitor and control nodes in its environment

screenshot_20230128_204900.png
screenshot_20230128_204900.png (196.6 KiB) Viewed 1603 times

Here it controls a color lamp when a player is nearby (the player detector is in active state):


Example program in mC:

Code: Select all

import "lib/techage.c"

const STATE = 142; // player detector state
const COLOR = 22;  // color lamp command
var OFF = "\377";
static var data;

func init() {
  send_cmnd(1, COLOR, OFF); // Turn color lamp off
}

func loop() {
  var resp;
  var sts;

  sts = request_data(2, STATE, 0, &resp);
  if((sts == 0) and (resp == 1)) {
    // Turn color lamp on
    send_cmnd(1, COLOR, &data);
    data = (data + 1) % 256;
  } else {
    send_cmnd(1, COLOR, OFF);
  }
  sleep(2);
}
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
mainspirit
Member
Posts: 16
Joined: Fri Mar 17, 2023 16:33
In-game: mainspirit

Re: [mod] Beduino [beduino]

by mainspirit » Post

Hello, we are faced with the fact that when using any Slavic language, ru, ua, instead of letters - dots. Is it possible to fix it somehow? Thank you.

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [mod] Beduino Controller [beduino]

by joe7575 » Post

Currently it doesn't work. VM16/Beduino only work with ASCII characters. But I can imagine a display that understands Unicode characters. In the controller, you would then have to define the strings with control characters so that they are output correctly on the display
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
mainspirit
Member
Posts: 16
Joined: Fri Mar 17, 2023 16:33
In-game: mainspirit

Re: [mod] Beduino Controller [beduino]

by mainspirit » Post

We have a technical server, and we want to make an in-game email for exchanging messages between players. Almost all of our players speak only Russian, Belarusian and Ukrainian. Almost no one knows English to correspond freely in it. We will be very grateful to you for any help.

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [mod] Beduino Controller [beduino]

by joe7575 » Post

I will try it soon...
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [mod] Beduino Controller [beduino]

by joe7575 » Post

We have a technical server, and we want to make an in-game email for exchanging messages between players. Almost all of our players speak only Russian, Belarusian and Ukrainian. Almost no one knows English to correspond freely in it. We will be very grateful to you for any help.
It is already working.
Try this example together with the termlib terminal:

Code: Select all

import "sys/stdio.asm"
import "sys/os.c"

func init() {
  setstdout(2);  // Use external terminal for stdout
  putstr("\b");  // Clear screen
  putstr("+----------------------------------------------------------+\n");
  putstr("|                Termlib Demo ÄÖÜäöüaßß                    |\n");
  putstr("+----------------------------------------------------------+\n");
}

func loop() {
  var c;

  c = getchar();
  if(c > 0) {
    while(c > 0) {
      putchar(c);
      c = getchar();
    }
    putchar('\n');
  }
}
I have a German keyboard and I have tested it with some German umlauts (ÄÖÜ).
It works as expected:
screenshot_20230720_200208.png
screenshot_20230720_200208.png (17.64 KiB) Viewed 973 times
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

User avatar
mainspirit
Member
Posts: 16
Joined: Fri Mar 17, 2023 16:33
In-game: mainspirit

Re: [mod] Beduino Controller [beduino]

by mainspirit » Post

Hello dear joe7575.

Your terminal is working fine!
There are no limits to our gratitude!
But is it possible to use formspec in the terminal to create a user interaction interface? And how to use formspec on Touchscreen on beduino in general? In Touchscreen, it was possible to display only text, as on a regular monitor. But feedback is needed. I couldn't find any examples of a program for this. Maybe I was looking badly? But if you don't have a description of how to do this with sample programs yet, we'll be looking forward to you writing it.
Tech Age is the main and main mod on our server. Everything else adapts to it. As the owner of the server, I am immensely glad that the developer of our main mod himself personally made a very necessary addition to us. I am sure termlib will be in demand on all servers using TechAge.

With great gratitude and respect, main spirit.

User avatar
joe7575
Member
Posts: 850
Joined: Mon Apr 24, 2017 20:38
GitHub: joe7575
In-game: JoSto wuffi
Location: Germany, in the deep south

Re: [mod] Beduino Controller [beduino]

by joe7575 » Post

There is a touchscreen mod available for techage: https://github.com/Thomas--S/ta4_addons
Unfortunately, it does not support Beduino, but you can ask the author to add Beduino support.
Sent from my Commodore 64. Some of my Mods: Tech Age, TechPack, Hyperloop, Tower Crane, Lumberjack, vm16, Minecart, Signs Bot.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests