Piero V.

Smart plug con Raspberry Pi e Telegram

Recentemente ho lavorato ad un progetto che mette insieme diverse cose che mi piacciono: Telegram, la Raspberry Pi, che insieme possono fornire un’ottima base per creare semplici dispositivi IoT.
In questo caso ho creato una presa intelligente, che può essere accesa e spenta tramite un bot Telegram.

I requisiti sono veramente semplici: di base servono una Raspberry Pi, una scheda con dei relè, delle prese e un po’ di cavi.

Se preferite, potete usare al posto della Raspberry Pi anche altre schede, l’importante è che abbiano un modulo per il GPIO. Per esempio per un altro progetto molto simile io ho usato una Orange Pi Zero, di cui ho già parlato.

Per quanto riguarda i relè, l’importante è che funzionino a 5V, in pratica tutte le schede che funzionano con Arduino vanno bene. Io per esempio ho preso su Aliexpress un paio di schede da 4 relè a meno di 2€ ciascuna. Ce ne sono anche dall’Italia: hanno il vantaggio di arrivare prima, ma costano anche 5 volte tanto.
Questa potrebbe essere l’unica spesa per il progetto, a patto che abbiate già del materiale elettrico di recupero e una Raspberry, almeno questo è stato il mio caso. … [Leggi il resto]

Adwaita+Tango for PuTTY

Recently I have started using PuTTY more and more. It is a very nice program that has lots of features but it has also a big problem: with the default settings, fonts and colors are a bit ugly and in some case the text is even difficult to read.

Luckily PuTTY has lots of customization possibilities. My first idea was to use Solarized (Light), because I use it also on my phone with JuiceSSH and on Gedit. However, almost immediately I realized this problem:

ls using the Solarized Light theme: the image shows that it is difficult to tells directories from files

As you can see, directories, files and links have almost the same color and are very difficult to distinguish. Notice that I have enabled the bold as font, which by default is disabled, otherwise directories and links would have normal weight, and it would be even more difficult to what is what. … [Leggi il resto]