# There are errors with the Bitrex's menu

**URL:** https://forum.xod.io/t/there-are-errors-with-the-bitrexs-menu/3858
**Category:** XOD Programming Questions
**Created:** [April 26, 2020, 4:06pm UTC](https://forum.xod.io/t/there-are-errors-with-the-bitrexs-menu/3858 "2020-04-26T16:06:40Z")
**Posts on this page:** 6
**Page:** 2

<div class="post-metadata">

### Author: ![cruntos](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/cruntos/32/2265_2.png) [@cruntos](https://forum.xod.io/u/cruntos)
#### Post date: [May 2, 2020, 1:19pm UTC](https://forum.xod.io/t/there-are-errors-with-the-bitrexs-menu/3858/21 "2020-05-02T13:19:46Z")

</div>

I confirm, everything works! But what have you changed? 😮 I saw what was changed, but how? 😀

---

<div class="post-metadata">

### Author: ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)
#### Post date: [May 2, 2020, 1:41pm UTC](https://forum.xod.io/t/there-are-errors-with-the-bitrexs-menu/3858/22 "2020-05-02T13:41:44Z")

</div>

One would be to create the nodes and clone the one of the library, but in this case combine the project with the library but editing the files manually.  
Sometimes I use two or three XOD instances and Notepad ++

---

<div class="post-metadata">

### Author: ![bitrex](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@bitrex](https://forum.xod.io/u/bitrex)
#### Post date: [May 7, 2020, 5:55pm UTC](https://forum.xod.io/t/there-are-errors-with-the-bitrexs-menu/3858/23 "2020-05-07T17:55:23Z")

</div>

It looks like cesars has found a solution to the original issue but I’m taking some time now to review that whole project as there are some additional things I’d like to improve, e.g. the button-presses that are detected from those integrated LCD-boards on an analog pin via analogRead sometimes seem unreliable, now that XOD allows easy inclusion of Arduino libraries in C+±defined patch nodes there is probably a better library available for that task. Or I could write a lil state-machine that should improve it.

At minimum the patch node for the input that reads the analog pin for the button-voltages shouldn’t have “Loop” as an input for its clock as I have it in the example, it should be clocked at a more reasonable frequency like 50 or 100Hz or something. But the simplistic voltage-comparator way I have it written would still allow the possibility of picking up invalid transitional-states from say switch contact bounce even at a lower sampling frequency.

---

<div class="post-metadata">

### Author: ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)
#### Post date: [May 7, 2020, 6:07pm UTC](https://forum.xod.io/t/there-are-errors-with-the-bitrexs-menu/3858/24 "2020-05-07T18:07:11Z")

</div>

There is a very complete Marco Colli library but my head can’t understand it haha.

> **[MajicDesigns/MD\_Menu](https://github.com/MajicDesigns/MD_Menu)**
>
> Menu system for displays with up to 2 lines. Contribute to MajicDesigns/MD\_Menu development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![bitrex](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@bitrex](https://forum.xod.io/u/bitrex)
#### Post date: [May 7, 2020, 6:14pm UTC](https://forum.xod.io/t/there-are-errors-with-the-bitrexs-menu/3858/25 "2020-05-07T18:14:37Z")

</div>

Nice! I will definitely look it over. My XOD-implementation is more simplistic and it’s rather inflexible, a bit of a “proof of concept.”

The ideal would be something more resembling a model-view controller and state-machine sort of thing to define menu transitions and effects of inputs, with more flexibility on what kind of inputs a given sub-menu could accept, what data it could display, and hand off to the “back-end” model.

How to translate that to something appropriate for XOD that could be expressed with patch node interconnections and have low storage overhead would take some thought 🙂

For a limited subset of inputs (one XOD “number”-type from a pot or something) the way I’ve done it is amenable to a model-view type of arrangement but essentially you have to build the “model” in XOD with storage and feedback nodes yourself; making the menu nodes abstract and having several overloads that could accept different types of data might be a useful improvement.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)
#### Post date: [June 6, 2020, 6:14pm UTC](https://forum.xod.io/t/there-are-errors-with-the-bitrexs-menu/3858/26 "2020-06-06T18:14:41Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

[Previous page](https://forum.xod.io/t/there-are-errors-with-the-bitrexs-menu/3858.md?page=1)
