domenica 27 gennaio 2019

SPARKFUN MICRO PRO


Dear friends,
I was  googling about how  to  use esp32 like  a usb  keyboard, but it doesn't seem feasible and youncan't use  the  arduino keyboard  library.
It seems only certain arduinos can use keyboard  library: Leonardo, micro, arduino 2, mkr serie.
I opted for sparkfun micro pro, because I found it in  the electronic  shop behind the corner.
At first glance I was very surprised for the size,  it's incredible  small, apart  that, keyboard libraries  works  perfectly on it.
You will wonder why am I interested  in such a device?
The reason is because I red of a device  called bash bunny.
That'an interesting concept,  because the idea of simply connect to the computer an usb keyboard and automagically control  it is the fantasy of my childhood and it  is used  in many Hollywood movies.
In past  I thought to simulate a cdrom with  an  arduino, because  it you pur certain  files  on a cdrom  the  old versions  of windows  executed it when you3 inserted the  cdrom  without asking, but  the latest  versions of windows  asks.
Basically  as usb  key  emulator you can do anything on the computer. You  can login, activate the command prompt or the  powershell  prompt  and write your  program and execute  it. Top can have the total control  of the system.
For example it you want to start  the command  prompt, voi nave to use this code:
include "Keyboard.h"
...
Keyboard.begin();
Keyboard.press(KEY_LEFT_GUI);
Keyboard.press('r');
Keyboard.releaseAll();
delay(2000);
Keyboard.press(KEY_RETURN);
Keyboard.releaseAll();
delay(2000);
Now you can write your commands
...
It you want to type many characters, you need an  sd reader to  connect to  the micro pro. Usually sd card  readers requires 5volt.  You  can  use  the  usb  to  obtain this Voltage. I bought the 3.3 volts  version  of the micro  pro because I wanted to connect  it to the esp32, but there is also  a 5v version.

sabato 19 gennaio 2019

FACE EDITOR

Hey guys,
I found a program that uses unsupervised learning neural network to generate random faces.
https://github.com/HackerPoet/FaceEditor
These faces are not faces of real people, these are faces of unexisting people. You click a button and it generates a random face,then you can change this face using many switches.
These are some faces I generated:

What happens if someone put a unexisting face in a fake facebook profile?