LVGL to design UX interfaces on epaper

lv_port_esp32-epaper is the latest successful attempt to design UX in C using Espressif ESP32.
If you like the idea please hit the ★ in my repository fork.
What is LVGL?

LVGL stands for “Light and Versatile Graphics Library” and allows you to design an object oriented user interface in supported devices. So far it supports mostly TFT screens and only some slow SPI epapers where supported. My idea is to add driver support so it works also in fast parallel epapers.

That is Lilygo EPD47. Parallel epaper with ESP32 WROVER and I2C touch interface that can be found in Aliexpress

The main idea is to use a bridge driver that pushes the pixels to EPDiy component using the set_px_cb and the flush callbacks in order to render the layouts on the supported epapers. This will have a performance hit but it will also allow us to draw UX interfaces in parallel epapers that are quite fast flushing partial refresh.
The development took about one month of research and many iterations until it became usable. I started with an easy choice since Lilygo sent me an parallel epaper as a gift once and I bough the rest in their official store. The idea is that this acts as proof-of-concept to demostrate that is possible and that it’s working as expected. It’s possible to design an UX directly in C and then using a controller like ESP32 you can directly interact with Home appliances such as lights or other devices, to control them or to read information such as sensors that can respond with short JSON messages to inform your epaper control board about temperature or other matters that you choose.

HARDWARE REQUIREMENTS:
LILYGO EPD47 T5-4.7 inch E-Paper (Link goes to Lilygo official store)
LILYGO T5-4.7 inch E-paper ESP32 V3 version Capacitive touch (IC driver is called L58)

More demos and videos

Recommended reads

CALE.es hits first 100 users

After almost one year on the run, my service to deliver images for epapers and TFT displays finally is starting to get some adoption. The idea was starting at the beginning of 2020 when the epapers and many great projects like EPDiy in hackaday started to be early adopted.

Our ESP32 Firmware does 3 things at the moment and is very easy to set up:

  1. It connects to cale.es and downloads a Screen bitmap.
  2. In “Streaming mode” it pushes the pixels to Adafruit GFX buffer and at the end renders it in your Epaper.
  3. It goes to sleep the amount of minutes you define

But then I needed to research more and a bigger idea was triggered: It was not enough to make an Arduino-esp32 firmware using GxEPD as a library. I wanted to learn more how epapers work and also to get out of Arduino-esp32 and get more into Espressif IDF framework. It was hard, I had some weeks where I achieved nothing, but after about one entire month of coding I finally saw the first small epaper refresh.
Soon there where 5 models more.

Today they are at least 20 models, including color ones, and getting back to EPDiy I added also support for parallel epapers being the new LILYGO T5S 960*540 the first fast paralell eink supported. And then come the touch part. First with Goodisplay FocalTech controller and last week with Chinese L58 controller for this new parallel epaper.

It was a long journey and time taking. But I think it was worth it and I see that at least 20% of the users are having their screens connected and enjoying a very low consumption calendars and photo-frames at home.
Very happy to make this possible and to bring something alternative to the usual arduino-esp32 Firmware. Something that you can hack, that is more understandable, and uses Espressif’s own framework. It might be not very well known for makers but is undoubtedly used in professional industry and it’s a very good alternative, with lots of examples and very well documented.

Next missions are to start making developer tools and examples to introduce uGFX interface design into ESP32 using epapers. There is a long journey ahead and we are very thankful for all the good feedback received so far.

Analysis of the YouHodler user interface and their default risk assessment

Since about 4 months I’ve been using this site to keep my Crypto assets and I really like the User experience (UX) and also the design, both of the website and their Android / Iphone application. YouHodler is a DeFi platform where you can store your Crypto assets and get a yearly percentage interest, just as other known websites BlockFi and Nexus. With the particularity, that YouHodler let’s you bet on UP / Down price changes and increase your assets (To be clear: That if your technical analysis is good and it goes in the direction you estimate)
It flows, uses very modern web techniques, that are not perfect since many times you need to refresh the whole thing until it works but it’s visually appealing and also simple to use. But there is something that called my attention and I wanted to write about it here, with some thoughts, because I’m sure that I’m not the only one that detected this.
This is not a critic to the site, but more my personal view, about how the UX and interaction design can influence risk and sometimes put the user in an undesired position just because he wanted to take a fast action to increase his assets.

Here is an enumeration of the defaults I’m talking about:

1. MultiHodl price bets take always your full amount of the Crypto choosed

Let’s say I have 48.5 UNI and I choose to make an UP bet this is what happens as default

MultiHodl UP bet as default full amount of the coin you choose, and a 11X risk (Price Down level 7%)

Only on Ipad / Iphone when you click over the amount to bet it offers a quick 20% or 50% selection.
That’s fine and much better than Android or the Web version that come with the full amount and you have to update it by hand. Are you in a rush since you loose momentum and click fast, well it’s your risk, you ‘ve just put all your Crypto at stake:

Now what happens if the default Price Down Limit (PDL) is hit?
As default is 11x or 13x that gives you about 7 or 8% PDL: If it suddenly goes down that amount you have 0 left. Is all gone. That’s what is a margin call about. When the down margin call is hit, in case of an UP bet, the amount you use as collateral is used to repay the Loan.

This is a real operation happening, and YouHodler is buying or selling assets, in a chain of loans so this is what is all about.

2. Longer term loans called Turbocharged

With another option called Turbocharged loans happens something similar, let’s say I choose to Turbocharge my 0.010045 Bitcoin:

Very similar situation. As default full amount is selected. As default the highest risk level is selected.
A -5% price down limit can “maybe” work after a very low moment, like in March 2020, or even in whole period till November 2020 since it was mostly in a bullish scheme going up all the time. But it’s not the normal situation, and everything that growths has pullbacks. This pullbacks are usually much higher than 5% and it maybe go 15 or even 20% down in a single day. That happens with everything if you see the stock marketing, but specially with Crypto. Now let’s check what happened in Black Friday as a first example:

Black Friday has seen some years a pullback for Cryptocurrency, no idea why. That is a 12 % pullback in 24 hrs.

Now that is a 12% pullback in less than 24 hrs. So imagine that even if we start a Turbocharged loan on the green arrow, we will be very happy since it goes up in the next hours, only to wake up the next day with the Price Down Limit call (PDL).
And what happens with a Turbocharged loan when the PDL is hit?
Basically you get part of the money back in EUR (If you choose EUR as borrowed ticker) but the rest of your crypto is gone forever. So be aware that when choosing a -5% PDL you are taking an unusually high risk that can backfire in any moment, even if at the beginning is going up. To make a more visual example with my own bad technical analysis and failure, this was done with 2.5 ETH in January 22 aprox. in a moment where all Crypto was going down at least 10%:

5% PDL was hit, got back 956 EUR, and my 2.5 ETH is gone. So I loosed aprox. 1.5 ETH

Please notice that this is my fault since I forgot to change the plan to a 2 Month -25% PDL. But is also partly the unusual YouHodler settings, that take the full amounts and the more risky options as their default choice.
Now the question is: Is this deliberately made? Or is just because the UX was designed like this?

Ultimately it is the user choice to select how much risk he is going to take. That is clear and I’m not complaining about it. In many cases I won, other I loosed, is all risk investment money that I can afford to loose and I won’t cry about it, not even a minute. But in this case, I think having such a great UX designer on board they could have done much better.
If you are DeFi company that is willing to make your users HODL their assets, then you don’t select the full amounts with the higher risiko as default. At least make this an user choice (More on that later)

3. Not transparent reporting options for MultiHodl bets

If you use MultiHODL for doing bets regularly, there is not any option to download a full report of your wins/looses. You have to make it yourself, this is for example my own online Excel for this:

214 € won on January alone.

As you can see, if you do a good technical analysis, and you are strong enough to hold and get out only in a win position there is some money to be made. And I could recover my 1.5 ETH in 2 months if I wanted to.
But that’s not the point. My idea to make this platform better is to add in the settings a Risk profile option:

◎ High risk, as default -5% PDL, x11 MultiHodl risk. Full crypto amount
◎ Low risk profile, as default -25% PDL, x6 MultiHodl risk. Uses 20% of your selected crypto

But as you see is not preselected the High risk option how YouHodler is doing it now is like this:

🔘 High risk
◎ Low risk

What I really expect as a user is that there is a setting or similar to select the default risk I’m going to take. Maybe not preselected, just let the user decide.
There is a reason there are laws in place at least in the EU, so you cannot preselect the join newsletter when a user registers:

☑ Join our newsletter

You won’t see something alike in a website. At least not in an European website since the protection laws clearly forbid this and there is high fine to pay if you do it.
I know that the decentralized finance is a different situation and I’m not saying that what YouHodler is doing is inherently bad or wrong. It’s just my opinion that it should be a better option to do it.
Or at least like I mentioned before, to let the user select his risk profile in settings so the defaults are treated differently for each personal setting.

This will be a very smart choice to make the users more secure about using the platform and also a way to make the YouHodlr users hold more assets instead of loosing them in wild rides with the highest risk in a volatile market where you should be better a good technical analyst instead of a wild cowboy.
I hold only a part of my assets in YouHodler and others are in my private wallet. Part of them are also in my girlfriend BlockFi account, I think is a good idea, not to put all eggs in one basket since in this game is all about risk.

That said I’m fond of using YouHodler even with the issues I mentioned. I think it has a lot of potential and is very well designed in many aspects, their UI is consistent and the user experience well designed, something that being a backend website developer I can confirm.
Any reaction or explanation for my claims here will be also published, and of course ideas or comments, are always welcome.

MultiHodl bets and the psychology of risk in crypto

I wanted to start writing a post about how to get out of bad bets. But instead I read some articles about risk psychology and I think that’s the best way to explain why we end up loosing many not only on betting, but in investing on general.
The best advice I can give on YouHodler Multi HODL up bets on crypto like Bitcoin or Ethereum is that you need to be patient. And unless you made a very bad choice, like at the top before there is price correction, you should always wait and get out in the winning side. Now if you are not patient enough is better you don’t use Multi HODL because you can loose a lot of money with fear of losing or FOMO bets (Fear of missing out)
Make a technical analysis and a plan. Stick to it and be patient.
Crypto mostly goes up except on special days where it can have big correction

In my personal opinion what plays mostly against a good bet or investment is impatience, fear to loose, and being too emotional. Actually if you want to be a good player when making a bet, you need to learn to use that feelings on your side, but naturally this forces play against you. You could wait some minutes more and get out of the bet 10% higher, but you could not stand the first two red candles and got out before time, and like this multiple different variations that are in the history of my bad bets.
Risk-taking behavior refers to situations in which a decision is made whose consequences depend on the outcomes of future events. Events that we study previously and are quite sure that go in one direction. But even the most perfect analyst can make a bad guess and the top of that the prices of Cryptocurrency are influenced by so many things with many big players and institutions buying and selling millions that the most bully upwards run can end up in a scary downfall at any moment of the day. Unpredictable.
To resume it in a few words the fact is that most of the time our knowledge of probabilities is far from exact. We can study the last movement days, draw on the chart and make prediction lines, even read analysis of experts that are years studying this markets and still with all this information we can fail. Because behind the visualization of a stock price chart there is a billion dollars market, with humans taking decisions all over the world, updating that price movements. It’s not humanly possible to predict what will be the direction for the next days, not to say hours. We can estimate it, but then the prices can give us a cold bath of reality when the outcome is much different from our prediction.

The experimentalist’s view

Psychologists Kahneman and Tversky in 1979 asked subjects questions similar to this:
Which would you rather have, $3,000 for sure or an 80% chance of winning $4,000?
Most subjects prefer the $3,000 for sure even though the expected value of the gamble is higher:
0.80 x $4,000 = $3,200.

This kind of preferences are conventionally labeled “risk aversion” as are preferences favoring a 90% chance of winning $3000 over a 45% chance of winning $6000.
In my personal case I would for sure prefer the 3K since I have sometimes such a luck that I will fall in the 20% and get out with my empty hands.
There are many different theories among experimentalist’s about this. The portfolio theory is based on the premise that choices among risks reflect a compromise between maximizing expected value and achieving an individually determined ideal level of risk.
In the utility theory, subjects are assumed to “compute” something similar to an expected value, but instead of using the objective cryptocurrency amounts, they operate on subjective amounts. One that used this concept wisely was Daniel Bernoulli who said that the value of money is not absolute, but depends on how much one has already:

Any increase in wealth, no matter how insignificant, will always result in an increase in utility which is inversely proportionate to the quantity of goods already possessed

Bernoulli (1967)

An alternative explanation for risk aversion can be found in the idea that decision makers pay differential attention to the best and worst outcomes in gambles.

A Two-Factor Theory for Risky Choice
Behavior has both inner and outer sources. We are disposed by our unique constitutions and histories to behave in certain ways, and each person has an unique approach when it comes to making a bet or investment. Two-factor theory uses both a dispositional factor and a situational factor to explain risky choice. The dispositional factor describes the underlying motives that dispose people to be generally oriented to achieving security (i.e., risk averse in conventional terminology) or to exploiting potential (i.e., risk seeking in conventional terminology). These factors are sometimes in conflict and sometimes in concert, producing complex patterns of behavior in which risk averse choices and risk seeking choices exist side by side in the same individual’s behavior [Lola Popes, see references at the end of this post]

How to get the most of MultiHodl bets

I wrote already about the MultiHodl bets in my last blog post. Multi HODL is an innovative tool to bet on price changes on Crypto assets invented by YouHodler.com
My theory is many failed bets have something in common:
That we were not patient enough to wait until is in the winning side.

You may say, yeah! Right, but I was losing 20% of my bet… Sure I completely understand that and I also losed more than 20% on my own bets for that same reason.
Talking frankly there is two ways of getting out of a bad bet. Let’s say that you analyze the past days, have the bottom and top of the mountain tracked, and you think that it effectively is going up.
So you place a 300 € bet that is going UP, risk level X8, so there is some place for failure (As more X risk level the margin call is reduced) Well it starts go in the direction you think, but after 3 minutes, it starts going down.

After studying the past this was the logical curse of the price. Slide the image below to see what happened

This is an example of a real bet. Is not a simulation. Because of the fear that the never ending going down red line for 2 hours and not getting out to cut out looses short, you end up getting out in the worst place of all!

60 € lost just because lost hope and fear that all will be lost

This fear is just not grounded! It’s just fabricated since after seeing this long red candles down after such a long time, you just loose all hope. This is not the way to do a right bet.
In case your prediction does not go as expected you have 2 options:

  1. Cut your losses short, so if the curve does not go as you expected, you cut loose at 5% max very closely to the start.
  2. Do not loose the hope, stay cold as a rock, and wait until the price goes up again and you can get out in the winning side.

But staying in the middle of this two is not a sane option and the way you can loose a lot of money.
Cut your looses short and keep your winnings at large!

To end up the story, I recovered that 60€ doing another 8 bets of about 9€ gain each. It can take many bets to recover from a very bad bet.
Another good option is to make a “seed bet” of minimum amount, like 60 €, with low risk and only after seeing your theory is like expected then you make the bigger bet. Remember that the starting point is the key for a good bet. The ideal kickoff is a MultiHodl UP bet in the base from the mountain after analyzing the past days lowest points.
But even like that things can get tricky so have an escape plan ready. If things drift from your prediction an unacceptable % you either cut your looses very short and assume the loss or you are patient and strong enough not to loose the hope and get out in the gain side. Believe me, most of the bets, could have gone right if the holding was long enough but instead I freaked out and got out in the bet in the worst moment.
But either 1 or 2 you don’t stay in the middle way. Because that’s the worst decision of all and you get out in the worst moment probably with a big loss.
Please note that this is only for the cases where you studied the margins and it’s not a crazy bet like going up at the top of the price or going down at the bottom of the mountain. This extreme cases do not count, if you do that I guess it was just a fail, and getting out as fast as you can is the rule!

Keep in mind that any money source that you use in this bets should be preferable Stablecoins and investment money that you can afford to loose!
I recommend to use Stablecoins or FIAT since loosing Crypto is always painful. The best is just use money and if you afford to win then you can buy more Crypto or just transfer it back to your local bank. Risky choices are choices that have an element of danger. They are risky and may come to a bad end in case the direction changes abruptly and you are not in control. Losses may be sustained, hopes may be shattered, or opportunities wasted. That said, keep your winnings at large, and cut your looses short!
Do not use a small screen like your mobile, half awaken, to place a bet after. Open TradingView or any similar stock market chart analyzer in a big screen and make a seasoned and thoughtful decision.


If you want to try YouHodler you can open an account here. Their app has great usability and feels secure, the withdrawals are fast, and their support answers within the hour. So far I had a very good impression of their Finance platform.
However I would never recommend to hold all your assets in one platform. We have half of our assets in YouHodler and the other half in another DeFi platform called BlockFi which also has very good recommendations.
BlockFi is launching very soon world’s first Bitcoin rewards Credit Card. This is great since enables you to use this card to get cash in any automatic terminal or also to buy things just like any other VISA card and earn 1.5% back in bitcoin on every purchase. We joined the waiting list.

References:
The psychology of risk – Lola Popes ( PDF )
Definition of Multi HODL

Slosarek a shop for handmade interior design

Inspired by the modernism and minimalism slosarek.eu makes beautiful concrete flowerpots, bowls and candles.

Since 3 months I’m involved in a project to mount an ecommerce in PHP/ Symfony 4. My client makes beautiful objects for the home interior using concrete as her main material.

The goal is to make something minimalist, since in my opinion, most of her creations have this minimal feeling. A simple shape, mostly an unique color, except on some pieces where red is used are the characteristics of most of her creations.

After an initial research on existing ecommerce projects like Magento and other Symfony based, I choosed Sylius because of it’s straigh-forward installation and customization possibilities.
So far me and my client is happy with the result, we will keep adding ideas and measure what is the impact on the site on the next months. I’ve always said that is not easy to sell in the internet. Even if your product is good, a considerable amount of time needs to be spent just on planning how to drive traffic to your site, SEO and most important Content.
Because content at the end is the king. And only you will appear in the search results and with some luck, be linked from external websites, if you have good and quality content that satisfies what the users come to find in your website.

That said I hope we started in the right path, like every ongoing project, there is long road ahead.
If you like interior design and handmade objects go ahead and check it out.

Uncovering crypto spams

This year I started to get Spam in some chat discord channels and also in my email account. Reported the spamming companies on http://econsumer.gov It turns out there is at least 155.000.000 u$ reported as being lost by Scams so far only in 2020. This is no joke, 155 million dollars, only in reported scams. Look at the following report of this year with the 5 main countries where the reports come from:

The coinRIZ.com case

I received in my chat channels a message that was affected also part of my contacts:
Due to the situation with Covid-19 we decided to give an incentive help our users to start in Crypto. You just won 0.6 BTC!
Just register and use this code: XXXBLAH to claim your price.

Wow! I just won 9.500 € (In todays aprox. exchange rate) Can you imagine someone will just give you as a present, even 500€, like this randomly? Not even in your wildest dreams unless you hit the lottery Jackpot. This should raise the first alert! No serious site will promote their services with Spam in the first place. So Spam + Win a prize is obviously a scam. But still knowing this I registered, and even uploaded a valid ID with a fake address, since I want to know how far they go with their technique: And I must say, impressive work guys. Let’s have a quick overview of the features:
* They simulated 100% being a Crypto exchange site.
* They created all user flow, added support (That they will never answer)
* Added a place to “redeem” your price and all looks like taken care of
Except when you take a detailed look:
The domain is registered some days ago. The SSL certificate is not signed with a name. Big red alert, never trust a site like this!
Their address and privacy policy, somewhere in Estonia, seems fake to me. But anyways, where is the trick, now that we come to this point?

Let’s follow, so I registered, and now I want to claim my price using their so called CODES. A way to exchange crypto without paying transaction fees, let’s put the code they sent me and claim my price. Maybe for once in my life I will get something for free.
I did it. I see 0.61 BTC in my balance. And now comes the Wow moment:

We don’t trust you the scammers claim. First deposit 0.03 BTC to unfreeze your balance! (Aprox. 400€)

We need to be very naive to think this action will unlock any possibility to recover this money. This guys are real scammers and are poison to all the internet community.
I encourage you, if you ever see this kind of actions, to report it as a fishing site so other people get a browser alert when they navigate to this site. But also to file a report in eConsumer.gov and the online authorities of your country. Because they may be some people fooled by this. Because it matters that the people behind this kind of shady businesses, specially mentioning help Covid or people in need, are heavily punished and their sites blacklisted.
There is a lot of crap in the internet. That we all know, but this activities, along with the sites that trick you disguising themselves as your bank or trusted sites are the worst of all.

Be aware of it! Never send funds or trust a site in doing business unless you research first if they are legit. And don’t be indiferent to it, flag it and report it using the tools mentioned below. Only together as a community we will fight back this madness.

Use this websites to report them:

eConsumer.gov Report an online Scam
Scamrate for coinRIZ

Report scam or fishing in FireFox / Chrome / Safari

  1. Select Help > Report Deceptive Site
  2. Paste the URL of the phishing site and submit report
  3. Or simply browse the Report fishing page from Google

The text I used was something for the report was similar to the one below.
URL: coinriz.com
Comments: Fake Cryptocurrency exchange. It sends Spam using chat/email channels and it’s already in anti-spam lists. After receiving an invitation, where they claim to give “for free” in order to help people after the Covid-19 crisis, they ask you to validate your account sending a deposit of 0.03 BTC (Aprox. 400u$)

Repurposing the MIDI protocol to control Led Matrixes

DATA FLOW: Midi out > Sparkfun midi HAT > ESP32 > RX Uart > C++ Processing > FastLED RMT output

Meet Remora-matrix a project that started with the idea to sniff MIDI messages and make simple visuals on a LED-Matrix. Our previous Firmware Remora was intended to receive short commands from ORCΛ and make very simple Neopixels animations on addressable LEDs stripes (WS2812B like)
With this one I decided to go a step further and make two versions, one that uses nodejs as a middleware (Requires WiFi and UDP) and other that uses MIDI serial, received directly via Serial2 (TX, RX) UART and hence requires no WiFi connection.

  1. NODEJS VERSION
    This version uses a middleware script that sniffs a MIDI port (Ex. USB) and converts the messages into UDP messages that fly over WiFi to a destination IP. This script lives at the moment in middleware directory. An npm install needs to be run in order to install the required JS libraries.
cd middleware/midi-to-udp
nodejs midi.js
// Will list available midi entries. Requires port and udp destination IP
-p, --port_id  ID: Port name
                  0: Midi Through:Midi Through Port-0 14:0
                  1: USB MIDI Interface:USB MIDI Interface MIDI 1 20:0
                                                              [number] [required]
   -u, --udp_ip                                               [string] [required]

// EX. listen to port 1 USB Midi and forward them to UDP x.x.x.x:49161
// Port is fixed to the ORCA default port, feel free to update it  ^

nodejs midi.js -p 1 -u 192.168.12.109

This script will simply run in the background and redirect them using a simple short message that we designed to be compatible with both UDP and Serial versions.

2. MIDI SERIAL version
This uses the Sparkfun Arduino midi HAT that cost around 15 u$ and it can be found both in eBay and Aliexpress. The easy task is to build a connecting PCB below that hosts the ESP32 at the side of the HAT with the RX and TX cables from the HAT outputs connected to the ESP32. This HAT has an opto-isolator, also called octocoupler, that converts the MIDI signals into readable UART messages.
My prototype construction looks like this:

MIDI Hat alternative, but you could also build the MIDI to Serial yourself, in my case was easier to get it build

The MIDI Hat was designed for Arduino and requires 5 volts to run, so the 4 cables wiring is pretty straightforward:
HAT midi > ESP32
5v . . . . 5v
GND . . GND
RX . . . . 26
TX . . . . 27

I’m quite sure the TX goes to TX in the ESP32 but may be also the opposite. There is no standard for this I think. But in case it does not work just invert it, there are only signals, so you won’t break anything for trying this. The advantage of Serial are that have less latence than WiFi. Depending on how clean your connection is, sometimes WiFi UDP packages can become clogged, and get out all together which is quite an undesirable effect if you are working with LIVE music. Also UDP nature is designed to be very fast, but has no order like TCP.
It’s possible that a note played comes in different order as expected. Or if WiFi is shared, that while your Router is busy, the packages will accumulate and then sent all together, causing a burst of shapes in the Matrix in a moment that does not correlate with the music. This is not happening with the Serial version since there is no middleware redirecting packages and it cam be run without any PC in the middle. As there are no flying WiFi messages, has less latence and it’s much more reactive and fun to work with. Being the only pitfall being that you need a MIDI cable from your computer or Synthesizer to the MIDI Hat + ESP32 controller.
Most LIVE music lighting equipment does not rely on WiFi and there is a good reason for it!
Reliability.

Building our own internal Midi messaging system

Since this two versions want to achieve the same goal, that is converting the MIDI played into shapes, I though to create an internal messaging that is shared. Maybe this can be a C++ class or component in the future so it should speak the same language, no matter what version you use. The result is very simple, we will keep Channel internally and will use only Note + Status + Velocity.
Status and Channel come in the first byte. Then comes the Note and at the end the Velocity. Once we get the last byte, we will assemble this with the following syntax:

2 chars (HEXA) representing Note played 
1 boolean      representing Status (1 note on, 0 note off) 
2 chars (HEXA) representing Velocity

NNSVV  Note, Status, Velocity

Example: Playing DO in octave 3 that is 36 in decimal, velocity 60, Note ON message would be:
 2413B When the same note is released it could be: 24000 

After building the message the channel is analyzed. It can either hear on all channels leaving the constants in platformio.ini to 0. Or hear in 3 different channels (Also 3 instruments) this can be of course modified, but 3 is a good balance, to see something that can be correlated with the music. The configuration for this is on platformio.ini file using build_flags

   -D SERIAL2_BAUDS=31250
   -D RXD2=26
   -D TXD2=27
   -D MIDI_LISTEN_CHANNEL1=1
   -D MIDI_LISTEN_CHANNEL2=2
   -D MIDI_LISTEN_CHANNEL3=15
   -D MIDI_FIXED_VELOCITY=0
   -D MIDI_BASE_OCTAVE=4
   -D MIDI_TOP_OCTAVE=12

There you can see that this will only forward packages for channels 1,2,15 all the rest will not be sent to the matrix.
There is also an option to ignore Velocity and use a fixed number ( MIDI_FIXED_VELOCITY )
And depending on the song, it could played on a high tone, or in a lower tone. Because our matrix is limited, we need to define BASE_OCTAVE and TOP_OCTAVE so we can have a drawing range.
That is the most important midi configuration. It would be desirable to have a “learning phase” where you can simply hear the first 10 seconds of a song and calculate this BASE and TOP margins automatically. This a future idea that might be implemented.

Interpreting the messages

I left just a demo of how to interpret this in C++. As we have 2 different firmware versions, one that listens UDP messages, and another one that get’s MIDI via UART you have to select what to compile editing platformio.ini File:

[platformio]
default_envs = esp32
# Uncomment only one of the folders to select what example to run:

#src_dir = firmware/udp-midi-matrix
src_dir = firmware/midi-in-matrix

Every message at the end triggers a function that draws a shape. And that part is open to every different implementation. For example, you can draw a different shape per channel, like:
Ch1 – Usually piano or main instrument – Rectangles
Ch2 – Triangles
Ch3 – Circles
Ch4 – Lines and so on

As said this is just an example, but it’s open to draw anything you want, since we are using GFX over the RGB Led matrix. Also you have the Velocity, that is the pressure that is applied to the key, so you can use this factor to make the shape bigger or change colors. The possibilities are unlimited.
There is only one important thing to keep in mind. A note with status 1 should be drawn, but same note with status 0, signalizes that the key was release hence we should delete the shape.
At the moment is just an experiment that will may never see the light out of my studio, but nevertheless I wanted to leave this post as a declaration of intentions, in case someone wants to fork this and make his own take.

Credits go to this awesome libraries

https://github.com/marcmerlin/Framebuffer_GFX.git
With Framebuffer Marc Merlin did an awesome job
https://github.com/FastLED/FastLED.git
FastLED is one of the most powerful RGB Libraries for Arduino / ESP32
https://github.com/marcmerlin/FastLED_NeoMatrix.git
NeoMatrix let’s you map the RGB Led matrix to use GFX

I writed to Marc Merlin who did the amazing job of adding GFX to FastLED and here I wanted to quote his answer

About FrameBuffer GFX: The good news is that your code will now run mostly unmodified on other displays like LCDs, or RGBPanels, or even display on linux.
Like this you can write all your code, run it, and debug it on linux, and then upload it to ESP32 or rPI when it’s done.
After that, you can go big!

Marc
Demo videos, just for fun, not representing at the moment the finished work

Understanding how to make good decisions when betting on Crypo Multi HODL bets

Multi HODL is an innovative tool to bet on price changes on Crypto assets invented by YouHodler.com . YouHodler is a Swiss based company that is innovating in the field of Crypto financials.
I enjoyed a lot using Multi HODL but I was not well informed when I started with it and I make a lot silly mistakes, hence I decided to write this blog post with my advice, to help potential users have a fresh start. Now let’s take a look at the chart below with the 2 main Crypto assets in 2020. The fact is that since Covid started, Crypto values sinked abruptly, and after that they grown with an unusual force until being on the maximum tops cornering the end of 2020. This is how an Ethereum vs. Bitcoin looks like in 2020.

ETH vs Bitcoin price in 2020 – TradingView.com

Looking at both charts, ETH on the top although the king on the price is Bitcoin, there is something obvious: The grow direction with some temporary drop prices it’s always going UP.
It’s good to follow Bitcoin and Ether, or the coin you follow, together. As Gold is the king of the metals value, so it’s Bitcoin in the Cryptocurrency world, so if you open BTC and ETH in two horizontal panels you will see they mostly correlate over time. Usually, but not always!
So it’s essential to follow both to have a clear tendency indicator.
Multi Hodl let’s you bet on price changes in both directions, Up or down changes:

Going UP is always better than down

This are my personal recommendations about using it to avoid falling in common mistakes.

You should only reserve for this kind of bets as small percentage of your assets while leaving the rest in YouHodler savings account so it generates a steady 4.5% year interest on Crypto and 12% in Stablecoins. And the best is to not play with your Crypto assets directly, but to bet with a Stablecoin, like EURs or USDT. That way you can have more control of the gains and looses without altering your precious holdings in Crypto.

Disclaimer: This are only my views and recommendations on how to bet on UP Multi HODL Bets, with the least risk as possible and without falling in very common traps. I’m not an financial expert and this are hints that I summed up after my own mistakes.

Be aware of momentum of the year and special days. For example if you are close to black friday, check how it was historically on that day. Avoid days where you don’t see market volume, avoid special dates like Black fridays and any other internet related thing since this Crypto is attached to the internet somehow. And this special days can be specially tricky!!!’
Do a search, research the field, before planting a seed. If you are not going to take the time to do this research it’s better not to bet.

This easy tips are only based in the last price movements from Ethereum which may be very different from those of other cryptocurrencies. ETH price was hectic in the last weeks and it’s recommended to bet only UP when you see a clear grow pattern.

1. For starters: Use only the UP button and a low Risk factor (X2 or X3).

Background: Even if you make a bad decision, you can always wait, and at some moment it will go up. The price per hour is calculated using the initial Bet and your Risk factor. If you use take a big risk is not optimal to wait long hours.

Checking last months on ETH or BTC it’s going up. It’s a no brainier!
Unless you know what you are doing and you know that there is a big price drop you may try the DOWN button. But it must be a fast action, and if you loose the timing, is very probable that it will never go down again. Avoid the DOWN button. Be wise, make only UP bets in crypto!

2. The starting point is essential! The best to start an UP bet will be at the lowest point possible on a trend that looks going upwards. Look macro movements, not mini like just 2 hours range!

Explore last 5 days, even last 2 weeks, and double check that your prediction matches. Starting your race in a good point gives you the leverage to wait in a comfortable position in case there is a temporary descending path.

3. Micro betting examples: To start playing with it and avoid big looses is a very good idea to try a micro-bet. Just use a low value like 0.06 ETH or from 30€ for example of a stable coin. Doing that you can also afford to have a bigger risk factor since the bet is small and in the worst case there is not much to loose. This way you can learn the first days/weeks till you get a feeling for it without loosing part of your assets.

4. Clearly identify grow direction: Check the Macro movements on last 5 days, last month. Usually it’s always UP but is important to detect that after days of continuous grow there is usually a DOWN cascade. So don’t trust the always UP game. The key to make a good Bet is to hold it from a low point, so you have leverage to stop the Multi HODL, at the beginning of that cascade and not at the end. Also is a good tip to see the top of the saw mountains, if the peaks go UP, it’s a GROW pattern . If they go DOWN is a DECREASING pattern. Sounds easy but it’s not always straight-forward to see. Below my analysis, finding lowest nightly point and start of my bet, 8% up prediction for next hours.

5. Don’t double bet at the beginning: It’s very tempting to make a second bet to cover the looses of the first one (Ex. I though was going, but is going down, let’s make an additional DOWN bet!). Although can be a good idea, unless you master points 1 to 4, this is not recommended, and as mentioned before DOWN bets are a bad idea that have to be done precisely.

What it may be a good idea, is to make a “seed Bet” of a minimal import For the lowest possible 0.06 ETH for to see your idea was good before making a bigger bet, then you can close them at different times knowing that with the small one there is a minimal risk. Both going UP!

6. Mind the GAP: From the starting point, let’s imagine the scenario where you start an UP Multi HODL bet of 0.7 Ether when ETH price is 590 u$. Mind the origination fee of 0.45% cost that you can see in Details plus the hourly fee, that can be high if you choose a high risk factor (X).

Example: 0.7 ETH Multi HODL bet at X7 factor taking in account the costs, will start generating something only above the 595 u$. So this first 0.5% UP is only to cover the costs. So make the appropriate markings in your favorite Stock Chart online viewer, in order to visualize this risk, and to get away at the proper time in case goes down abruptly. Using lower risk factors like X2/X3 makes the initial cost lower and has also the advantage that if you start in the wrong point, you can wait till the new upward Wave in order to avoid stopping the Bet on RED numbers. Theoretically, unless the exceptions when the starting point is not wisely chosen or the bad luck to start when a DOWN cascade is flowing, you should only quit an UP bet when it’s on the winning side and not before.

7. Mind the Growing vs. Decreasing speed: Usually it’s quite normal that the grow movements are like a chain Saw of short upward movements with down cascades every now and then. If the cascades are short and do not cut all the grow is great since it’s a clear signal that there is increasing GROW.
But it’s not uncommon that after a long upward Saw shape comes a BIG cascade DOWN. And that’s sometimes really fast down compared to the grow speed, be ready for it, and away from your danger top bottom line (Where you start loosing)

It’s very important not to freak out in this point and stop the Bet in the most down part of the cascade. This is a very common error that stopped many of my good bets. Get accostumed to this movements, make your margins visible drawing over the live stock Chart and HOLD it unless you see clear signs of a catastrophe!

8. Don’t overuse it and do not get addicted to it: Making one or two good Bets you can call this a day and just walk away happy till next day. The luck to be always in the growing side is not take for granted. Many times you may not see a DOWN cascade of death coming, and in one fail, loose the gains of many good guesses. Use this consciously, you are playing with real money here. And start slowly, making Micro bets as described in point 3, to get the feeling and timing for it. Keep in mind doing this is time consuming and may make you tired!!! Find the good moment to start it.
This is the key for a very good Bet!

9. Be aware of context on the Crypto you are making the bet. For example if you are betting on Ethereum, then follow the ETH developers and related channels. Starting this month they are launching ETH2 and I bet that had an effect on the super bullish unusual grow on the last few days.

10. If possible don’t use your Crypto on this! Your mission is to HOLD your Crypto and have an stable financial future. So playing with it’s a bad mix. Unless you are sitting on a stronghold of Ether or Bitcoin and you are wise enough to keep your balances right I strongly recommend to use any Stablecoin that you can afford to loose to do this kind of bets.
Do not forget: You are playing with real money when you start a Multi HODL, and even that it looks like always going up on a Macro zoomed out view, the reality is that is not always a constant growth. And in a single day can be a 10% drop on the price, if you are there on one of this UP bets, you will loose at least 1/3 of what you bet if you don’t get out in the right time.
So I will say it again in case it was not clear:
Separate your betting risk money from your Crypto assets if you want to be in the safe side!

11. Last but not least, do not play with Bottom margins. Let it breathe!
It’s very human to think: I will just control my risk setting a very low margin so I can sleep in peace!
There is two problems with this approach:
1. As described in point 6 there is a gap from the Bet start till you start winning so setting a very short down limit can let you out with the worst scenario. I will describe this with an image after declaring my intentions. Also mind that the margin stop loss has a high cost!
In case of margin call or stop loss you will be charged a 2% service fee instead of origination and hourly fees. In the App/Website says 3.8% fee but is wrong (Already reported this)
This 2% is taken from the total amount depending on your risk factor so it’s much better to stop it by hand if you want to do so. This limit is just a safety ring to avoid loosing absolutely everything. But it’s not recommended to use it unless there is a good reason to do so and always tight to your starting point!!!
Failing to do so and having a bad starting point is a guaranteed way to loose the bet. To have a real scenario, let’s say the total borrowed money for the bet is 2000 u$, margin call with take 2% of that so you will end up paying 40 u$ just for the automatic margin call. Don’t do this.
If you don’t find time to be relaxed and follow your bet is better not to start it. This is the wisest advice I can give to you after gaining some experience.

2. Is very normal that you think is the best start point and it’s not. You cannot control the snake and cannot possible predict the future. So just let it breathe and at some point it will grow. And if it does not and hope is lost then at least wait enough time to get at the highest point and stop the bet manually.

Anatomy of a Bad bet and a very bad decision: To set a low margin call, see it was just about to wait longer!

This is fun but also risky and time consuming. And it’s also something that can be done in a wild, hectic coin like ETH, but also on more stable ones and doing it with more calm waters can be the key to success in this crazy oceans of 2020.
I highly recommend to do this confortably from a Desktop computer since the UX is much nicer defined and is more precise. I had two times problems when starting this from the iPad since the rist leverage is close to the UP button and withouth intention you can start with the Highest risk. The mobile App is good to stop the bet, but to be on the safe side, start it confortably from your laptop.

Managing risk

As mentioned before this takes risks of loosing real money. And it’s supposed to be done with assets you can afford to loose. If you don’t like risk at all then you don’t have to do it. You can just leave your Ether, Bitcoin, Litecoin or many other coins just there and use it as your wallet, generating 4.5% yearly interest.
Or 12 % in stable coins. I have some EURs assets that is 1 coin, 1 euro and this generates a nice passive income that you use as a end of the year savings or any time when you want to invest in buying more Crypto.
This is are only my personal views and I’m not a financial expert. I’m just a worker that is tired to be in the office 9 hours / 5 days a week and is looking for financial freedom.

Related articles

Keeping your Crypto assets to generate 4.5% (ETH, BTC) to 12% (stablecoin) yearly interest

Since 22 Dec, 2020 the Ethereum yearly interest rate was upgraded to 5.5% one percent more than before making YouHodler one of the platforms that generates more interest to hold ETH.

YouHodler latest update

As an addition to latest article “Financing a web-project with Ethereum” I wanted to show how to make your Crypto assets grow a small percentage per year and also to have some additional cash per month using Stablecoins.

Stablecoins are cryptocurrencies designed to minimize volatility, relative to some “stable” asset or basket of assets. For example there is EURS that is tied to the € price also 1 EURS = 1 €.
Another one is PAX Gold that is tied to the price of one ounce of Gold and generates 8.2% APR. Both Stablecoins are a subset of Ethereum network. With PAX Gold you can if you go to London, exchange your coins, for real gold. That’s what they claim at least since I would not fly there to prove it. More than that, the point I want to make here, is that in sites like YouHodler you can make 12% APR compounding interest per year when holding EURS.

Let’s say you have 10.000 € there for one year untouched.
At the end of the year you should have 11.200 € with a 12% interest.
If you want you could extract this 1200 € to your account and have some extra cash at the end of the year for further investments of a short holidays. That is a quite interesting method to generate a passive income over the years.
Below there is a talk about stablecoins that was recorded and had 464 registered participants from 58 different countries, on April 17 2020

Now the only risk I see is that this money is not on your domains. It’s hosted in a secure wallet in the domains of a company. So what I recommend, no matter what site you choose, is to check very well and read about who is behind the company and how secured are your assets in the event something happens with the company you choose.
I use to trust the banks a lot until one day at the middle of 2001 in my hometown, Buenos Aires, the economy crashed and the banks simply will not let you take your dollars out of your acccount. Or even worse, they where converted to argentinian money, something that at that moment was the equivalent to flush your cash into the toilet.
Ater that happened to me, got an offer to work in Spain and moved to the EU in 2004, and I always take care of where I put my assets and making an analysis of the risks. Of course we are in Europe and here the protection laws, would simply not allow a bank run like that to take place, still with that assumptions it is wise to check where you put your money.

Team of YouHodler

In case of YouHodler my analysis was good and as I mentioned in last post, the fact that they are a members of the BlockChain Association and the Financial Commission, and that they open profiles show an extensive and proved career in the Financial tech industry was enough for me. The fact that they have real offices in Malta but also in Switzerland is also a proof that they real and solid.

Disclaimer about 100% transparency: I’ve decided to sponsor YouHodler and will also make some videos and further analysis openly. The links starting with track.youhodler.com are affiliate links since I want to get additional cash in order to film the videos and use my time to share with my readers the road to financial freedom and to generate an additional income each year.
‘This links won’t work from Germany or from Spain due to country restrictions. But from those countries you can enter directly to youHodler.com
This does not mean that I blindly recommend this company. There are also others in the market like Nexo that offer a similar percentage (2% less on stablecoin). Feel free to explore and take your decision solely on your assumptions.

You can also earn crypto faster with Multi HODL but that is something that must be handled with care and deserves a new Blog post. For the moment I only recommend to keeping combined assets, like for example some Bitcoin and Ethereum, along with Stablecoins like EURS or PAX Gold in order to generate a passive income.
Do not try Multi HODL with the dream of making a fast buck. It’s very risky to use it, specially with the variations value of cryptocurrency, that is like trying to take control of a wild snake. This must be used with care and meditation.

Questions for my subscribers:
What do you think about this?
Would you trust an external company part of your assets provided they are trustable and generate a yearly passive income?

I bough some ETH back when it was 260 -> 280€ now it has gone up almost 100€ in two months. That was a lucky desicion. But is not always like this and it can be that due to market changes, external factors, or just the team Ethereum development roadmap that it simple goes down too.
This was a good analysis made by an user of TradingView months ago:

This second analysis was also quite accurate. 1 ETH is worth today 19 Nov. 2020 about 470 dollars (395 €).

Financing CALE.es using Ethereum

CALE.es is a screen administrator where you can mix the content of different APIs and generate output images for your WiFi displays (Epapers / TFT)
An idea that starting taking form when I started playing and building epaper WiFi displays using ESP32 “system on a Chip” boards back in November 2019. I needed a web-service to get a simple image URL and test my epaper builds. That triggered the idea to build something more powerful where you can configure APIs, like Google Calendar, iCal or weather and use this outputs to compose your Screens. The idea flourished into a full pfledged website and web-service that is currently used by 60 developers to feed their WiFi screens.
All this part is slowly getting new features and functionality, both in the web-service side (PHP / Symfony 4) and on the ESP32 Firmware (C++ both for arduino-esp32 and ESP-IDF Firmwares)

5.83 Good display black/red epaper



So far I can call it a success project. It was online 99.9% of the time and the users seem to stick to it with about 20 % of them using it for their online Calendars, epapers and other displays. You can also use it to generate a JPG image that is added into your Website.
But of course all this also generates a cost. Not only domain name per year that is minimal, but also AWS server costs and my own maintenance and development costs. Even if I do it because is my hobby and I like it, I could be working this time for other clients for paid projects, so I count also the aprox. 14 to 20 hrs that I spent on it as if it was a job that somehow needs to generate something. And also the 1500€ that where spent in hardware and electronics, for example buying epapers and 3D-printing materials, in order to built at least 12 test displays that I partly own and others where sent to testers and clients.

After spending countless hours in projects that at the end where not successful or went into the project cemetary after months of the launch day I become wiser. So this time I had to find a better alternative to self-finance this project on it’s own.
I’ve explained openly how this project was going to be financed, and also added CALE Ethereum address in my github repositories, to receive donations from users that use the Firmware in their businesses. In all this about turning to Ethereum to finance the project I made a mistake, that was to start a mining server, since it’s not a wise idea to do it in a country like Germany where the electricity is expensive. But overall it was a good idea to receive mini-donations and also to stack my crypto assets in a platform like YouHodler where you can receive 4.5 % annual interest rate.

I researched quite a lot before taking this decision to see if Youhodler was trustable enough to do this operation and this is what I found:

  1. YouHodler is a member of the BlockChain Association and the Financial Commission. This independent Association will ensure all YouHodler users have an outlet for dispute resolution outside of the YouHodler platform. If you think YouHodler fails to meet your expectations, feel free to submit a complaint and you’ll get a quick, unbiased and non-binding resolution.
  2. YouHodler Trustpilot review is Excellent.
  3. They are a young company but with a deep knowledge in Financials and the persons that appear in the about us section are real, linking to their LinkedIn profiles, with proved experience in the sector.
  4. They hold at least more than half a billion dollars in Ethereum and more in Bitcoin. I don’t think that there is any interest in disrupting that trust, since that would be the end of their reputation in any other company.

At the end is all about trust in this. And this is just my risk but at least is a way that this site can be working free of charge for everybody. Not all the other projects that I started had the same luck!

I would like to ask my readers and followers:
What is your experiency with Cryptocurrency?
Can be this the key to future financial freedom?

Related blog posts