Tuesday 18 December 2018

Extending the monitor: if the DisplayPort doesn't work

For a long period of time I tried to connect my notebook Dell with his related monitor to extend it without success.
The particular connection between those two devices was:

  • DisplayPort standard cable as first port on the monitor (also this device was branded Dell);
  • HDMI port on the notebook.
The connection (it seems like a movie's title..!!)

We usually have a connection which is HDMI-HDMI, but this is one of those strange cases in which the cable has two different ports on the different sides.
The first think a guy thinks to do is to buy a perfect cable for this case: I bought a wire with HDMI on one side and DisplayPort on the other (I spent 12€!!).

DisplayPort-HDMI cable.
Nothing.
It didn't work anyway. At this point my colleague suggested me to use a normal HDMI cable and on the monitor side to use an HDMI-DVI adapter. In this way I could connect the HDMI side direct with my notebook and the other side connected with the adapter and the adapter with DVI port of the monitor this time.

HDMI-HDMI cable
HDMI-DVI adapter
 Finally this solution worked perfectly!!

Thursday 13 December 2018

#RomaFF13 | L'anti-scienza - Il caso Ilaria Capua

Between Italians and Science there is a relationship of distrust.

Just think of the vaccines. But, the case about Ilaria Capua, internationl famous virology overwhelmed by a media false scandal that branded her like a trafficker of viruses, it's exemplary.

Now Ilaria reconstructs the story and elaborates its teachings. And a group of authoritative witnesses analyzes a collective feeling: in Italy it's easier to trust a fake news than a scientist?

Posterity will judge...

Friday 7 December 2018

Tuesday 4 December 2018

Computer brand to avoid

Ok, this could seem to a medieval index, but no: it's not referred to personal ideas. This is a list of computer brand to avoid based on my personal experience.

  So, These are the brands I want to avoid for my next purchases:

  • Acer
  • Toshiba

PS: this is my personal thoughs about which brands I'll try to direct to next time:

  • Dell 

That's all folks!

Wednesday 21 November 2018

Particulate meter - PPD42NS (Part II)

Relative to the previous post (Particulate meter - PPD42NS) now I can show the real results (effective datas) measured in my room in an period of 233 mins(3 hours and 53 mins).

To do this I had to modify the Arduino code in this way:
/*
 Interface to Shinyei Model PPD42NS Particle Sensor
 Program by Christopher Nafis 
 Modified to convert 0.01 cf to liters by Remo Tomasi
 Written April 2012
 Re-written November 2018
 
 http://www.seeedstudio.com/depot/grove-dust-sensor-p-1050.html
 http://www.sca-shinyei.com/pdf/PPD42NS.pdf
 
 JST Pin 1 (Black Wire)  => Arduino GND
 JST Pin 3 (Red wire)    => Arduino 5VDC
 JST Pin 4 (Yellow wire) => Arduino Digital Pin 8
 */
 
int pin = 8;
unsigned long duration;
unsigned long starttime;
unsigned long sampletime_ms = 60000; // 60 sec
unsigned long lowpulseoccupancy = 0;
float ratio = 0;
float concentration = 0;

void setup() {
  Serial.begin(9600);
  pinMode(8,INPUT);
  starttime = millis(); 
}

void loop() {
  duration = pulseIn(pin, LOW);
  lowpulseoccupancy = lowpulseoccupancy+duration;
  if ((millis()-starttime) >= sampletime_ms)
  {
    ratio = lowpulseoccupancy/(sampletime_ms*10.0);  
    concentration = (1.1*pow(ratio,3)-3.8*pow(ratio,2)+520*ratio+0.62)*3.534; // * 3.534 to liters
    Serial.print("Concentration = ");
    Serial.print(concentration);
    Serial.println(" pcs/l");
    lowpulseoccupancy = 0;
    starttime = millis();
  }
}

Therefore, I introduced the conversion from cf (cube feet) to l (liters) and then I increased the sampling time from 2000 ms (= 2 secs) to 60000 (= 60 secs = 1 min).

Our unite measurement is, exactly, 0.01 cf = 283 ml = 0.283 l

So,
 

I multiply the formula of concentration for this last number.

Once I started the acquisition by arduino I had to redirection datas from the output device (on Ubuntu) which was COM3 that correspond to the device ttyACM0. To do this I simply wrote the following command on the command line (bash on Ubuntu 18.10):

cat /dev/ttyACM0 > log.txt

cat show to the monitor datas from COM3, but using '>' we redirect this information to a file called "log.txt" updated every 60 secs (the same time datas arrive). In this way we obtain a list of values like this: 

98726.26 pcs/l
35037.72 pcs/l
38756.15 pcs/l
27820.51 pcs/l
14590.92 pcs/l
17182.41 pcs/l
13278.62 pcs/l
8403.57 pcs/l
31862.78 pcs/l
...

Please Note: I had to launch this commmand before the capture:

ttylog -b 9600 -d /dev/ttyACM0

Why? Beacause the capture command seems doesn't work well and the previous command it's like a configuration of the channel. If you don't find this command you can install through this:

sudo apt-get install ttylog

I opened the log file into a spreadsheet software to manipulate the datas...and finally I've plotted the values obtaining the following graph:

Values of pcs/l plotted.
That's all folks!

Tuesday 20 November 2018

Particulate meter - PPD42NS

One of my dreams was to measure particulate in the air and make this operation simple.
Thanks to the PPD42NS sensor this is possible. Obviously we have to use an Arduino (UNO in my case) to connect to and to abtain datas.

PPD42NS particulate meter.
The connection is very fast and simple (the following project was made by me using Fritzing IDE):
Connection schema between PPD42NS device and Arduino UNO

I opened the Arduino IDE to write the code, in reality I found this code online, I copied it and pasted on the IDE:
/*
 Interface to Shinyei Model PPD42NS Particle Sensor
 Program by Christopher Nafis 
 Written April 2012
 
 http://www.seeedstudio.com/depot/grove-dust-sensor-p-1050.html
 http://www.sca-shinyei.com/pdf/PPD42NS.pdf
 
 JST Pin 1 (Black Wire)  => Arduino GND
 JST Pin 3 (Red wire)    => Arduino 5VDC
 JST Pin 4 (Yellow wire) => Arduino Digital Pin 8
 */

int pin = 8;
unsigned long duration;
unsigned long starttime;
unsigned long sampletime_ms = 2000; 
unsigned long lowpulseoccupancy = 0;
float ratio = 0;
float concentration = 0;

void setup() {
  Serial.begin(9600);
  pinMode(8,INPUT);
  starttime = millis(); 
}

void loop() {
  duration = pulseIn(pin, LOW);
  lowpulseoccupancy = lowpulseoccupancy+duration;
  if ((millis()-starttime) >= sampletime_ms) //if the sampel time = = 30s
  {
    ratio = lowpulseoccupancy/(sampletime_ms*10.0);  
    concentration = 1.1*pow(ratio,3)-3.8*pow(ratio,2)+520*ratio+0.62; 
    Serial.print("Concentration = ");
    Serial.print(concentration);
    Serial.println(" pcs/0.01cf");
    Serial.println("\n");
    lowpulseoccupancy = 0;
    starttime = millis();
  }
}
 

I found the code here :
http://www.howmuchsnow.com/arduino/airquality/grovedust/

As you can see in the following pictures (and as written in the code) the yellow wire is connected to the pin 8: this wire contains the information about the  of particulate.

The particulate was positioned vertically.

Following the previous schema I connected Arduino to the sensor.

The project has brought out the following results.

Obsviously we need to calibrate everything not to having had a reference emission source.

Here you can see the related video on my personal YouTube channel:




Results:
Results on Arduino IDE monitor.


Concentration values were taken in the following unit of measurement:


pcs / 0.01 cf

where pcs stand for pieces and cf for cubic feet (0.01 cf = 283 ml).


Next steps: 
  • transform of the unit measure in ml;
  • sampling at the rythm of 5 mins;
  • export datas on an electronic sheet;
  • visualization in real time of the datas and graphic them;
  • comparison of data with those of the CNR (!!).
That's all folks! ...for the moment! 

Monday 12 November 2018

Optimal transport and Mechatronics

Image result for optimal transport

Yesterday I was discussing with my sister's boyfriend about a machanical matter: how to know where a moving object will be instant by instant from a point to another if looking at it was a robot.

It's not so simple as we might be tempted to think: the robot moves and at the same time sees something moving. It could usefull for the problem of a car guided by an AI.

Today I though of Alessio Figalli (the second italian winner of the Field Medal 2018): optimal transport, shift an object from a point to another at the lower cost.

A light bulb lit up in my mind: could it be everything connected with the optimal transport or at least with a simplified version?

...help!

Monday 22 October 2018

'Honor' to my Nexus 5

It was not the best title I could do: that 'Honor' it's the same name of another smartphone builder, but for us nerds it was a joke to be exploited!
But after 5 years of  'honored' service I had to say goodbye to it.

And with the same mood (joy) I show you the internal structure of my Nexus 5 aka "Avalon".
As you can see I used a plectrum (the same used to play my guitar) to open the back part. surprise!



That's all falks!

Monday 15 October 2018

Amazon AWS

I received the opportunity to access again to an old subscription: Amazon AWS (Amazon Web Services). After a deep discussion I though that they'll be the future of the computer science in term of a new paradigm of services distribution!
Something better than Google!

Let's start again!





This is the basic plan...

Basic Plan
  • Included with all accounts
  • 24/7 self-service access to forums and resources
  • Best practice checks to help improve security and performance
  • Access to health status and notifications

Monday 24 September 2018

A complicated subject: delegate in C#

This is my last adventure in coding: delegate in C#.
I swear I didn't understand its usefullness: is it important to modify an event? Can I?
Yes, complicated. But if I find the light at the of the tunnel I'll talk about it soon...

Saturday 8 September 2018

Why I cannot create a great startup here

My first (and last in temporal order) startup it was not so brilliant. A group of young man who tried to make a dream come true. It does not matter what kind of dream.

We was, apparently, one of the best group that anyone could imagine:
  • numerous: 5;
  • relative young: from 20+ to 30+;
  • different figures: designer, developers, manager...
  • a good idea.
but...someone could say, as usual, that

"We didn't have a common vision."

but...reading better the situation and, above all, reading an important book[1] I noticed that 

"We weren't not quite similar"

Yes. This is the real question as in each moment of our life. To feel good, to work well we have to be with someone who is similar to us.
So, If don't find someone with my same workaholic that doesn't share my vision I'm not likely to create a startup here.
But I know that it's important to fail in the startup's world.

[1] A. Dusi, Come far fallire una startup ed essere felici, BOMPIANI, Aprile 2018

Thursday 6 September 2018

Sunday 2 September 2018

Monday 25 June 2018

Trying Google Cardboard

This is my Google Cardboard:


With it I found a way not only to do new kind of experiment,
but a new way to go away from my reality.

It's a pleasure to understand how it works: first of all I had to
unpack everything and mount each component in a way to
start the use of my cardboard.

Once I extracted the instrument I opened the box and followed the instructions.

It was very simple to open that strange "wings",
try to make a match between the different parts.




I was very excited while I was building this
binocular, each little part was unravelled
and now it was in front of me ready to make me
curious to explore another kind of reality.










Nearly like a "Transformer" it was turning from a simple box to a useless thing able to carry me
to another world.


And now it was there!
Just like a fiction helmet, only the main piece was missing: my mobile to inserted in the front.











 Ok, the mobile was positioned in the exact housing:
remained to be done only the choice of the movie or the
video suitable for the cardboard.
 Do you see how is perfect the case for the mobile?
The carton is not so fragile as we can think, in the contrary it is very resistant.







Take the opportunity to try something new.















Obviously we cannot choose a normal format video: we have to try a movie composed of two images one for the left eye and one for the right.



In this way we can start our adventures.
I suggest to use the app "Cardboard" for your first experiments:
Then you can find more videos simply going on YouTube searching by "Google Cardboard video" (or similar words).

During my experience I had the opportunity see imaginary world and to see the Aurora!! Exciting!!

Good adventure!

Saturday 23 June 2018

My Day

What am I doing today?
  • Weather station:
    • buying electric box (going to the shop in Lecce by bike);
  • Studying Deep Learning;
  • Experimenting with the VR (using the Google's Cardboard);
  • Reading something about History: Vikings (on the National Geographic supplement: STORICA);
  • Reading a little bit of the book FACTFULLNESS (knowing our world by the use of the facts [Hans Rosling]);
  • Using Duolingo for the study of three of the following languages: 
    • Swedish;
    • Norwegian (Bokmal);
    • Danish;
    • German.
(Of course I didn't mentioned the contour things: cooking, washing, etc...)

That's all...

Friday 18 May 2018

My next projects

This is a short list about my next projects:

  • a chiper weather station;
  • a new app based on GFS satellite's information; 
  • antenna for receiving GFS satellite's signals;
  • using D3 to generate graphics online for my weather forecasts;
  • use of machine learning in weather forecasts.
I hope to have some ideas about anything out of weather forecasts!! :-D

Tuesday 17 April 2018

Arduino and Blynk (1)

This is my last experiment with Arduino UNO and the adding of the useless platform Blynk (for Android).
So I decided to have a real time visualizer of a set of datas for Android.
Preview of the experiment
In the picture we can see the presence of a special clock which provides not only the time, but also the environmental temperature. In this way we can compare our misure with the real misure.
All we can see that the values are the same (22°C the first number on the tablet and the number in the blue squared clock on the right side). 
The other values are: humidity (48%), Dew point (10.47°C) and the pressure (1004.27 hPa).
In one of the next posts I'll show you all the construction phases and the starting of the generation of a real electronic board.
Follow me... 

Wednesday 14 March 2018

Thingspeak and my weather station

Once I have built the minimal structure of my weather station I decided it was important to become public the datas on the web in a way I could read it everytime I could. 

The name of the solution is ThingSpeak: on this page I can create my personal channel on which I can connect my ESP8266 via Wi-Fi and visualize, through linear graphics, various informations like temperature, pressure, humidity (and also a map with the point where the station is).

Here it is the graphic about the atmospheric pressure (updated in real time!)


Here is the link the site: ThingSpeak
And the complete link to my personal weather channel: https://thingspeak.com/channels/145284

Sunday 21 January 2018

MeteoLecce (10): It's online!

In the night between January the 20th and 21th I finally published my first app "MeteoLecce" on Google Play!
We have to celebrate... with water! (I'm almost abstemious...)



Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY

You can find it on Google Play 

My first app on Google Play!

Rate me if you want (above all if you come from Lecce :D )

Tuesday 2 January 2018

MeteoLecce (9): new design!

I want to update the development of my app MeteoLecce. I'll start we the two following pictures:

The main activity of MeteoLecce
Do you see some changes?
I reduced the information on the first activity and I compacted them; in this way we have a much simpler reading of them (I also introduced the colors).

The activity related to the next 3 days weather forecast

Relating to second activity's infos I added 4 icons for each day (at the times: 0 - 6 - 12 and 6 P.M.). Tempeatures are two: high/low.

I hope to share my app on Google Play soon.