# data[].attributes.body
codice semplice e interessante

# data[].attributes.attachment_link.title
Come utilizzare il sensore ad ultrasuoni HC SR04 con Arduino

# data[].attributes.attachment_link.description
Semplice esempio di come utilizzare il sensore HC-SR04 con Arudino. Schemi e codice li puoi trovare qui http://bit.ly/arduino-hc-sr04 Musica: Take a tour on my mind di Max Palmer (https://www.jamendo.com/it/track/1093797/take-a-tour-on-my-mind)

# data[].attributes.headline
Arduino - pilotare Motore con potenziometro

# data[].attributes.subject
Arduino - pilotare Motore con potenziometro

# data[].attributes.attachment_link.readable_text
Inizialmente questo articolo era stato scritto al volo per dare una risposta al commento di Enrico, che voleva pilotare un motore dc controllandone velocità e direzione tramite un potenziometro. Data la sua semplicità di comprensione e realizzazione, credo che lo schema ed il codice siano sufficienti.
Il circuito si rifà all'articolo L298N pilotare un motore DC con Arduino.

Lo schema:

Ingredienti:

Il codice:

/*
 * Autore  : Andrea Lombardo
 * Web     : http://www.lombardoandrea.com
 */

 //definizione dei pin
static int pinDirezioneMarcia = A0; //pin analogico deputato a leggere i valori del potenziometro
static int mA = 12; //pin digitale per determinare gli stati logici da inviare al modulo
static int mB = 13; //pin digitale per determinare gli stati logici da inviare al modulo
static int pinPotenza = 11; //pin digitale tramite il quale inviare un segnale di tipo PWM tramite la funzione analgWrite()

//variabili usate per gestire e mostrare i valori di operaizone
int accelerazione;
int potenza;  //valore in uscita dal pin 11

void setup() {
  //inizializzo la comunicazione seriale cosi da mostrare i valori nel Mointor Seriale
  Serial.begin(9600);

  //inizializzo variabili
  accelerazione = 0;
  potenza = 0;

  //definisco tipologia pin
  pinMode(pinDirezioneMarcia, INPUT); //input in quanto legge il valore analogico del pin A0
  pinMode(mA, OUTPUT); //output perche' definisce lo stato logico del pin IN1 del modulo L298N
  pinMode(mB, OUTPUT); //output perche' definisce lo stato logico del pin IN2 del modulo L298N
  pinMode(pinPotenza, OUTPUT);  //output perche' definisce il valore PWM del pin EN1 del modulo L298N

  //pullDown sensore pinDirezioneMarcia
  digitalWrite(pinDirezioneMarcia, LOW);

  //Definisco il senso di marcia del motore
  /*
    mA |   mB  | Evento
    -----|-------|----------------------
    LOW  | LOW   | fermo
    LOW  | HIGH  | Movimento in un senso
    HIGH | LOW   | Movimento senso opposto
    HIGH | HIGH  | Fermo
  */

  digitalWrite(mA, LOW);
  digitalWrite(mB, HIGH);

}


void loop() {

  //leggo il valore analogico del potenziometro sul pin A0.
  int valorePotenziometro = analogRead(pinDirezioneMarcia);

  /*
    Il range dei valori analogici e' da 0 a 1023 mentre il range dei valori PWM  e' da 0 a 255
    per mantenere questa proporzionalita' eseguo la mappatura dei valori
  */
  int valoreMappato = map(valorePotenziometro, 0, 1023, 0, 255);
  determinaMovimento(valoreMappato);
}

void determinaMovimento(int valoreMappato) {
  String direzione = "";
  if (valoreMappato <= 121) {
    //vai in un senso
    digitalWrite(mA, LOW);
    digitalWrite(mB, HIGH);
    potenza = map(valoreMappato, 0, 121, 255, 0);
    direzione = "DIETRO";
  } else if (valoreMappato >= 135) {
    //vai nell'altro
    digitalWrite(mA, HIGH);
    digitalWrite(mB, LOW);
    potenza = map(valoreMappato, 135, 255, 0, 255);
    direzione = "AVANTI";
  } else if (valoreMappato > 121 && valoreMappato < 135) {
    //ferma il motore
    digitalWrite(mA, LOW);
    digitalWrite(mB, LOW);
    direzione = "FERMO";
    valoreMappato = 0;
  }

  //Invio i dati letti al Monitro seriale, cosi da poterli vedere a video
  Serial.print("Accelerazione = ");
  Serial.print(potenza);
  Serial.print(" - direzione = ");
  Serial.println(direzione);

  analogWrite(pinPotenza, potenza);
}

Come sempre
Assicurati che tutti i collegamenti siano corretti;

Ricordati di impostare la porta COM del tuo Arduino;

Imposta la stessa velocità seriale definita in Serial.begin(9600), nel Monitor Seriale

E ricorda che io non mi assumo nessuna responsabilità per eventuali danni o disastri che causi 😀

Prodotti Amazon

Approfondimenti

Ricerche che hanno riportato a questa pagina:

# data[].attributes.attachment_link.title
Pilotare un motore dc controllandone velocità e direzione tramite un potenziometro - Andrea Lombardo

# data[].attributes.attachment_link.description
Inizialmente questo articolo era stato scritto al volo per dare una risposta al commento di Enrico, che voleva pilotare un motore dc controllandone velocità e direzione tramite un potenziometro. Data la sua semplicità di comprensione e realizzazione, credo che lo schema ed il codice siano sufficienti.

# data[].attributes.body
Arduino - protot

# data[].attributes.attachment_link.readable_text
Zoe Romano -

The robotic prototype swimming under water propelled by fins, it was developed at the Control Systems and Robotics Laboratory of the Technological Educational Institute of Crete, in Heraklion (Greece) and it's controlled by an Arduino Mega:

Each fin is comprised of three individually actuated fin rays, which are interconnected by an elastic membrane. An on-board microcontroller generates the rays' motion pattern that result in the fins' undulations, through which propulsion is obtained. The prototype, which is fully untethered and energetically autonomous, also integrates an IMU/AHRS unit for navigation purposes, a wireless communication module, and an on-board video camera. The video contains footage from experiments conducted in a laboratory test tank to investigate closed loop motion control strategies, as well as footage from sea trials.

the Arduino runs a custom-developed real time firmware that implements two Central Pattern Generator (CPG) networks to generate the undulatory motion profile for the robot's fins. The robotcontains a 7.4V lipo battery powering also a Bluetooth module for wireless communication and a video camera to record footage of the missions.

# data[].attributes.attachment_link.title
Arduino Blog " Watch a fin-propelled underwater robot prototype

# data[].attributes.attachment_link.description
Zoe Romano - The robotic prototype swimming under water propelled by fins, it was developed at the Control Systems and Robotics Laboratory of the Technological Educational Institute of Crete, in Heraklion (Greece) and it's controlled by an Arduino Mega: Each fin is comprised of three individually actuated fin rays, which are interconnected by an elastic membrane.

# data[].attributes.body
Trutoria in Italiano con help

# data[].attributes.attachment_link.description
Realizzazione di un sonar con visualizzazione su processing

# data[].attributes.body
Interfaccia grafica da usare anche con per Arduino

# data[].attributes.attachment_link.readable_text
We need
your help!

Help us continue with your generosity!

Processing is available for Linux, Mac OS X, and Windows. Select your choice to download the software below.

Read about the changes in 4.0. The list of revisions covers the differences between releases in detail.

Earlier releases have been removed because we can only support the current versions of the software. To update old code, read the changes page. Changes for each release can be found in revisions.txt. If you have problems with the current release, please file a bug so that we can fix it. Older releases can also be built from the source. Read More about the releases and their numbering. To use Android Mode, Processing 3 or later is required.

The changes document covers incremental updates between 4.x releases, and is especially important to read for pre-releases.

# data[].attributes.attachment_link.description
Help us continue with your generosity! Read about the changes in 4.0. The list of revisions covers the differences between releases in detail. Earlier releases have been removed because we can only support the current versions of the software. To update old code, read the changes page.

# data[].attributes.body
Radar

# data[].attributes.attachment_link.readable_text
In this Arduino Tutorial I will show you how you can make this cool looking radar using the Arduino Board and the Processing Development Environment. You can watch the following video or read the written tutorial below for more details.

Overview
All you need for this Arduino Project is an Ultrasonic Sensor for detecting the objects, a small hobbyist Servo Motor for rotating the sensor and an Arduino Board for controlling them. You can watch the following video or read the written tutorial below.

Components needed for this Arduino Project

You can get these components from any of the sites below:

*Please note: These are affiliate links. I may make a commission if you buy the components through these links.
I would appreciate your support in this way!

Building the device

First I made a cardboard stand for connecting the Ultrasonic sensor to the Servo motor. I folded it like it's shown on the picture below, glued it and secured to the servo motor using a screw like this.

Also I attached a pin header on which I soldered 4 jumper wires for connecting the sensor.

Finally I secured the servo motor to the Arduino Board using an elastic band.

There are also some special mount bracket for the ultrasonic sensor from Banggod. You can get them from the following links:

Circuit Schematics

I connected the Ultrasonic Sensor HC-SR04 to the pins number 10 and 11 and the servo motor to the pin number 12 on the Arduino Board.

Source codes

Now we need to make a code and upload it to the Arduino Board that will enable the interaction between the Arduino and the Processing IDE. For understanding how the connection works click here to visit my Arduino and Processing Tutorial.

Here's the Arduino Source Code with description of each line of the code:

// Includes the Servo library
#include <Servo.h>.

// Defines Tirg and Echo pins of the Ultrasonic Sensor
const int trigPin = 10;
const int echoPin = 11;
// Variables for the duration and the distance
long duration;
int distance;

Servo myServo; // Creates a servo object for controlling the servo motor

void setup() {
  pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
  pinMode(echoPin, INPUT); // Sets the echoPin as an Input
  Serial.begin(9600);
  myServo.attach(12); // Defines on which pin is the servo motor attached
}
void loop() {
  // rotates the servo motor from 15 to 165 degrees
  for(int i=15;i<=165;i++){
  myServo.write(i);
  delay(30);
  distance = calculateDistance();// Calls a function for calculating the distance measured by the Ultrasonic sensor for each degree

  Serial.print(i); // Sends the current degree into the Serial Port
  Serial.print(","); // Sends addition character right next to the previous value needed later in the Processing IDE for indexing
  Serial.print(distance); // Sends the distance value into the Serial Port
  Serial.print("."); // Sends addition character right next to the previous value needed later in the Processing IDE for indexing
  }
  // Repeats the previous lines from 165 to 15 degrees
  for(int i=165;i>15;i--){
  myServo.write(i);
  delay(30);
  distance = calculateDistance();
  Serial.print(i);
  Serial.print(",");
  Serial.print(distance);
  Serial.print(".");
  }
}
// Function for calculating the distance measured by the Ultrasonic sensor
int calculateDistance(){

  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);
  // Sets the trigPin on HIGH state for 10 micro seconds
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
  duration = pulseIn(echoPin, HIGH); // Reads the echoPin, returns the sound wave travel time in microseconds
  distance= duration*0.034/2;
  return distance;
}

Now we will receive the values for the angle and the distance measured by the sensor from the Arduino Board into the Processing IDE using the SerialEvent() function which reads the data from the Serial Port and we will put the values of the angle and the distance into the variables iAngle and iDistance. These variable will be used for drawing the radar, the lines, the detected objects and some of the text.

For drawing the radar I made this function drawRadar() which consist of arc() and line() functions.

void drawRadar() {
  pushMatrix();
  translate(960,1000); // moves the starting coordinats to new location
  noFill();
  strokeWeight(2);
  stroke(98,245,31);
  // draws the arc lines
  arc(0,0,1800,1800,PI,TWO_PI);
  arc(0,0,1400,1400,PI,TWO_PI);
  arc(0,0,1000,1000,PI,TWO_PI);
  arc(0,0,600,600,PI,TWO_PI);
  // draws the angle lines
  line(-960,0,960,0);
  line(0,0,-960*cos(radians(30)),-960*sin(radians(30)));
  line(0,0,-960*cos(radians(60)),-960*sin(radians(60)));
  line(0,0,-960*cos(radians(90)),-960*sin(radians(90)));
  line(0,0,-960*cos(radians(120)),-960*sin(radians(120)));
  line(0,0,-960*cos(radians(150)),-960*sin(radians(150)));
  line(-960*cos(radians(30)),0,960,0);
  popMatrix();
}

For drawing the line that is moving along the radar I made this function drawLine() . Its center of rotation is set with the translate() function and using the line() function in which the iAngle variable is used the line is redrawn for each degree.

void drawLine() {
  pushMatrix();
  strokeWeight(9);
  stroke(30,250,60);
  translate(960,1000); // moves the starting coordinats to new location
  line(0,0,950*cos(radians(iAngle)),-950*sin(radians(iAngle))); // draws the line according to the angle
  popMatrix();
}

For drawing the detected objects I made this drawObject() function. It gets the distance from ultrasonic sensor, transforms it into pixels and in combination with the angle of the sensor draws the object on the radar.

void drawObject() {
  pushMatrix();
  translate(960,1000); // moves the starting coordinats to new location
  strokeWeight(9);
  stroke(255,10,10); // red color
  pixsDistance = iDistance*22.5; // covers the distance from the sensor from cm to pixels
  // limiting the range to 40 cms
  if(iDistance<40){
    // draws the object according to the angle and the distance
  line(pixsDistance*cos(radians(iAngle)),-pixsDistance*sin(radians(iAngle)),950*cos(radians(iAngle)),-950*sin(radians(iAngle)));
  }
  popMatrix();
}

For the text on the screen I made the drawText() function which draws texts on particular locations.

All of these functions are called in the main draw() function which repeats all the time and draws the screen. Also here I am using this fill() function with 2 parameters for simulating motion blur and slow fade of the moving line.

void draw() {

  fill(98,245,31);
  textFont(orcFont);
  // simulating motion blur and slow fade of the moving line
  noStroke();
  fill(0,4);
  rect(0, 0, width, 1010);

  fill(98,245,31); // green color
  // calls the functions for drawing the radar
  drawRadar();
  drawLine();
  drawObject();
  drawText();
}

Here's the final appearance of the radar:

Here's the complete Processing Source Code of the Arduino Radar:

import processing.serial.*; // imports library for serial communication
import java.awt.event.KeyEvent; // imports library for reading the data from the serial port
import java.io.IOException;

Serial myPort; // defines Object Serial
// defubes variables
String angle="";
String distance="";
String data="";
String noObject;
float pixsDistance;
int iAngle, iDistance;
int index1=0;
int index2=0;
PFont orcFont;

void setup() {

 size (1920, 1080);
 smooth();
 myPort = new Serial(this,"COM4", 9600); // starts the serial communication
 myPort.bufferUntil('.'); // reads the data from the serial port up to the character '.'. So actually it reads this: angle,distance.
 orcFont = loadFont("OCRAExtended-30.vlw");
}

void draw() {

  fill(98,245,31);
  textFont(orcFont);
  // simulating motion blur and slow fade of the moving line
  noStroke();
  fill(0,4);
  rect(0, 0, width, 1010);

  fill(98,245,31); // green color
  // calls the functions for drawing the radar
  drawRadar();
  drawLine();
  drawObject();
  drawText();
}

void serialEvent (Serial myPort) { // starts reading data from the Serial Port
  // reads the data from the Serial Port up to the character '.' and puts it into the String variable "data".
  data = myPort.readStringUntil('.');
  data = data.substring(0,data.length()-1);

  index1 = data.indexOf(","); // find the character ',' and puts it into the variable "index1"
  angle= data.substring(0, index1); // read the data from position "0" to position of the variable index1 or thats the value of the angle the Arduino Board sent into the Serial Port
  distance= data.substring(index1+1, data.length()); // read the data from position "index1" to the end of the data pr thats the value of the distance

  // converts the String variables into Integer
  iAngle = int(angle);
  iDistance = int(distance);
}

void drawRadar() {
  pushMatrix();
  translate(960,1000); // moves the starting coordinats to new location
  noFill();
  strokeWeight(2);
  stroke(98,245,31);
  // draws the arc lines
  arc(0,0,1800,1800,PI,TWO_PI);
  arc(0,0,1400,1400,PI,TWO_PI);
  arc(0,0,1000,1000,PI,TWO_PI);
  arc(0,0,600,600,PI,TWO_PI);
  // draws the angle lines
  line(-960,0,960,0);
  line(0,0,-960*cos(radians(30)),-960*sin(radians(30)));
  line(0,0,-960*cos(radians(60)),-960*sin(radians(60)));
  line(0,0,-960*cos(radians(90)),-960*sin(radians(90)));
  line(0,0,-960*cos(radians(120)),-960*sin(radians(120)));
  line(0,0,-960*cos(radians(150)),-960*sin(radians(150)));
  line(-960*cos(radians(30)),0,960,0);
  popMatrix();
}

void drawObject() {
  pushMatrix();
  translate(960,1000); // moves the starting coordinats to new location
  strokeWeight(9);
  stroke(255,10,10); // red color
  pixsDistance = iDistance*22.5; // covers the distance from the sensor from cm to pixels
  // limiting the range to 40 cms
  if(iDistance<40){
    // draws the object according to the angle and the distance
  line(pixsDistance*cos(radians(iAngle)),-pixsDistance*sin(radians(iAngle)),950*cos(radians(iAngle)),-950*sin(radians(iAngle)));
  }
  popMatrix();
}

void drawLine() {
  pushMatrix();
  strokeWeight(9);
  stroke(30,250,60);
  translate(960,1000); // moves the starting coordinats to new location
  line(0,0,950*cos(radians(iAngle)),-950*sin(radians(iAngle))); // draws the line according to the angle
  popMatrix();
}

void drawText() { // draws the texts on the screen

  pushMatrix();
  if(iDistance>40) {
  noObject = "Out of Range";
  }
  else {
  noObject = "In Range";
  }
  fill(0,0,0);
  noStroke();
  rect(0, 1010, width, 1080);
  fill(98,245,31);
  textSize(25);
  text("10cm",1180,990);
  text("20cm",1380,990);
  text("30cm",1580,990);
  text("40cm",1780,990);
  textSize(40);
  text("Object: " + noObject, 240, 1050);
  text("Angle: " + iAngle +" °", 1050, 1050);
  text("Distance: ", 1380, 1050);
  if(iDistance<40) {
  text("        " + iDistance +" cm", 1400, 1050);
  }
  textSize(25);
  fill(98,245,60);
  translate(961+960*cos(radians(30)),982-960*sin(radians(30)));
  rotate(-radians(-60));
  text("30°",0,0);
  resetMatrix();
  translate(954+960*cos(radians(60)),984-960*sin(radians(60)));
  rotate(-radians(-30));
  text("60°",0,0);
  resetMatrix();
  translate(945+960*cos(radians(90)),990-960*sin(radians(90)));
  rotate(radians(0));
  text("90°",0,0);
  resetMatrix();
  translate(935+960*cos(radians(120)),1003-960*sin(radians(120)));
  rotate(radians(-30));
  text("120°",0,0);
  resetMatrix();
  translate(940+960*cos(radians(150)),1018-960*sin(radians(150)));
  rotate(radians(-60));
  text("150°",0,0);
  popMatrix();
}

Just change the values in size() function, with your screen resolution.

/*   Arduino Radar Project
 *
 *   Updated version. Fits any screen resolution!
 *   Just change the values in the size() function,
 *   with your screen resolution.
 *
 *  by Dejan Nedelkovski,
 *  www.HowToMechatronics.com
 *
 */

import processing.serial.*; // imports library for serial communication
import java.awt.event.KeyEvent; // imports library for reading the data from the serial port
import java.io.IOException;

Serial myPort; // defines Object Serial
// defubes variables
String angle="";
String distance="";
String data="";
String noObject;
float pixsDistance;
int iAngle, iDistance;
int index1=0;
int index2=0;
PFont orcFont;

void setup() {

 size (1920, 1080); // ***CHANGE THIS TO YOUR SCREEN RESOLUTION***
 smooth();
 myPort = new Serial(this,"COM4", 9600); // starts the serial communication
 myPort.bufferUntil('.'); // reads the data from the serial port up to the character '.'. So actually it reads this: angle,distance.
 orcFont = loadFont("OCRAExtended-30.vlw");
}

void draw() {

  fill(98,245,31);
  textFont(orcFont);
  // simulating motion blur and slow fade of the moving line
  noStroke();
  fill(0,4);
  rect(0, 0, width, height-height*0.065);

  fill(98,245,31); // green color
  // calls the functions for drawing the radar
  drawRadar();
  drawLine();
  drawObject();
  drawText();
}

void serialEvent (Serial myPort) { // starts reading data from the Serial Port
  // reads the data from the Serial Port up to the character '.' and puts it into the String variable "data".
  data = myPort.readStringUntil('.');
  data = data.substring(0,data.length()-1);

  index1 = data.indexOf(","); // find the character ',' and puts it into the variable "index1"
  angle= data.substring(0, index1); // read the data from position "0" to position of the variable index1 or thats the value of the angle the Arduino Board sent into the Serial Port
  distance= data.substring(index1+1, data.length()); // read the data from position "index1" to the end of the data pr thats the value of the distance

  // converts the String variables into Integer
  iAngle = int(angle);
  iDistance = int(distance);
}

void drawRadar() {
  pushMatrix();
  translate(width/2,height-height*0.074); // moves the starting coordinats to new location
  noFill();
  strokeWeight(2);
  stroke(98,245,31);
  // draws the arc lines
  arc(0,0,(width-width*0.0625),(width-width*0.0625),PI,TWO_PI);
  arc(0,0,(width-width*0.27),(width-width*0.27),PI,TWO_PI);
  arc(0,0,(width-width*0.479),(width-width*0.479),PI,TWO_PI);
  arc(0,0,(width-width*0.687),(width-width*0.687),PI,TWO_PI);
  // draws the angle lines
  line(-width/2,0,width/2,0);
  line(0,0,(-width/2)*cos(radians(30)),(-width/2)*sin(radians(30)));
  line(0,0,(-width/2)*cos(radians(60)),(-width/2)*sin(radians(60)));
  line(0,0,(-width/2)*cos(radians(90)),(-width/2)*sin(radians(90)));
  line(0,0,(-width/2)*cos(radians(120)),(-width/2)*sin(radians(120)));
  line(0,0,(-width/2)*cos(radians(150)),(-width/2)*sin(radians(150)));
  line((-width/2)*cos(radians(30)),0,width/2,0);
  popMatrix();
}

void drawObject() {
  pushMatrix();
  translate(width/2,height-height*0.074); // moves the starting coordinats to new location
  strokeWeight(9);
  stroke(255,10,10); // red color
  pixsDistance = iDistance*((height-height*0.1666)*0.025); // covers the distance from the sensor from cm to pixels
  // limiting the range to 40 cms
  if(iDistance<40){
    // draws the object according to the angle and the distance
  line(pixsDistance*cos(radians(iAngle)),-pixsDistance*sin(radians(iAngle)),(width-width*0.505)*cos(radians(iAngle)),-(width-width*0.505)*sin(radians(iAngle)));
  }
  popMatrix();
}

void drawLine() {
  pushMatrix();
  strokeWeight(9);
  stroke(30,250,60);
  translate(width/2,height-height*0.074); // moves the starting coordinats to new location
  line(0,0,(height-height*0.12)*cos(radians(iAngle)),-(height-height*0.12)*sin(radians(iAngle))); // draws the line according to the angle
  popMatrix();
}

void drawText() { // draws the texts on the screen

  pushMatrix();
  if(iDistance>40) {
  noObject = "Out of Range";
  }
  else {
  noObject = "In Range";
  }
  fill(0,0,0);
  noStroke();
  rect(0, height-height*0.0648, width, height);
  fill(98,245,31);
  textSize(25);

  text("10cm",width-width*0.3854,height-height*0.0833);
  text("20cm",width-width*0.281,height-height*0.0833);
  text("30cm",width-width*0.177,height-height*0.0833);
  text("40cm",width-width*0.0729,height-height*0.0833);
  textSize(40);
  text("Object: " + noObject, width-width*0.875, height-height*0.0277);
  text("Angle: " + iAngle +" °", width-width*0.48, height-height*0.0277);
  text("Distance: ", width-width*0.26, height-height*0.0277);
  if(iDistance<40) {
  text("        " + iDistance +" cm", width-width*0.225, height-height*0.0277);
  }
  textSize(25);
  fill(98,245,60);
  translate((width-width*0.4994)+width/2*cos(radians(30)),(height-height*0.0907)-width/2*sin(radians(30)));
  rotate(-radians(-60));
  text("30°",0,0);
  resetMatrix();
  translate((width-width*0.503)+width/2*cos(radians(60)),(height-height*0.0888)-width/2*sin(radians(60)));
  rotate(-radians(-30));
  text("60°",0,0);
  resetMatrix();
  translate((width-width*0.507)+width/2*cos(radians(90)),(height-height*0.0833)-width/2*sin(radians(90)));
  rotate(radians(0));
  text("90°",0,0);
  resetMatrix();
  translate(width-width*0.513+width/2*cos(radians(120)),(height-height*0.07129)-width/2*sin(radians(120)));
  rotate(radians(-30));
  text("120°",0,0);
  resetMatrix();
  translate((width-width*0.5104)+width/2*cos(radians(150)),(height-height*0.0574)-width/2*sin(radians(150)));
  rotate(radians(-60));
  text("150°",0,0);
  popMatrix();
}

# data[].attributes.attachment_link.title
Arduino Radar Project - HowToMechatronics

# data[].attributes.attachment_link.description
In this Arduino Tutorial I will show you how you can make this cool looking radar using the Arduino Board and the Processing Development Environment. You can watch the following video or read the written tutorial below for more details.

# data[].attributes.body
componenti

# data[].attributes.attachment_link.description
Puoi acquistare online tutte le schede, gli shield, i componenti e i kit Arduino su CampuStore, lo shop online più fornito sul progetto open source più famoso al mondo.

# data[].attributes.body
Componenti

# data[].attributes.attachment_link.title
Arduino - Elettronica Hobby Componenti elettronici

# data[].attributes.attachment_link.description
Home Page | Login | Registrati | Condizioni | Contattaci | Catalogo | Carrello | Acquista

# data[].attributes.body
Canali RC e Ricevitori

# data[].attributes.attachment_link.title
Ricevitori RC | Elettronica per modellismo in vendita online nel negozio Conrad

# data[].attributes.attachment_link.description
Acquista Ricevitori RC - Prezzi bassi e vasta gamma disponibile nel nostro negozio di Elettronica per modellismo. Sconto €5 sul tuo primo ordine e spedizione gratuita da €199.

# data[].attributes.attachment_link.title
HoepliScuola.it :: Teoria della comunicazione

# data[].attributes.attachment_link.description
Utilizziamo i cookie di profilazione, anche di terze parti, per migliorare la navigazione, per fornire servizi e proporti pubblicità in linea con le tue preferenze. Se vuoi saperne di più o negare il consenso a tutti o ad alcuni cookie clicca qui. Chiudendo questo banner o proseguendo nella navigazione acconsenti all'uso dei cookie.

# data[].attributes.body
in tempo reale

# data[].attributes.attachment_link.readable_text
L'INQUINAMENTO atmosferico, secondo i dati dell'Organizzazione mondiale della sanità, provoca ogni anno nel mondo circa 7 milioni di vittime ( 500mila circa in Europa). Solo l'8% della popolazione del Pianeta respira aria pulita. AirVisualEarth, un software realizzato da una startup francese, la AirVisual, nei suoi laboratori di Pechino permette ora di visualizzare in tempo reale su una mappa interattiva del globo queste piccole macchie azzurre circondate dal verde, il giallo e il rosso che segnalano una presenza crescente di polveri sottili. Un risultato, visualizzabile attraverso una app anche sul proprio smartphone, incrociando i dati prodotti dai satelliti meterologici con i rilevamenti di ben 8mila centraline di monitoraggio della qualità dell'aria sparse su tutto il Pianeta. Lo smog non dipende infatti solamente dalla presenza di traffico, fabbriche e altre attività umane che producono sostanze nocive, ma anche dal microclima e soprattutto dalla circolazione dei venti. "Rendersi conto di quanto è inquinata l'aria stando in casa non è facile e per questo abbiamo cercato un modo di facile comprensione", spiega il fondatore della AirVisual Yann Boquillod. "Vedere la rappresentazione in 3D dello smog presente sulla Terra è quasi scioccante, il nostro pianeta sta veramente soffrendo per colpa dell'inquinamento che noi stessi abbiamo prodotto". La società realizza anche previsioni locali sulla presenza delle polveri sottili nell'aria di 6mila città ricevibili via smartphone. "Desideriamo che le persone si rendano conto di quanto sia drammatica la situazione e che prendano innanzitutto adeguate misure di protezione per la propria salute, facendo poi pressione sui governi affinché intervengano per cambiare questo stato di cose", aggiunge Boquillod.

Analizzando oggi il dettaglio italiano della mappa prodotta da AirVisual, complice il forte vento di tramontana che sta spazzando la Penisola, spiccava una situazione sostanzialmente migliore della media, con un predominante color verde indice di inquinamento limitato e alcune macchie di una confortante tonalità di blu su Sardegna, Liguria e buona parte dell'Arco Alpino.

L'approfondimento quotidiano lo trovi su Rep: editoriali, analisi, interviste e reportage.
La selezione dei migliori articoli di Repubblica da leggere e ascoltare.

Saperne di più è una tua scelta

Sostieni il giornalismo! Abbonati a Repubblica

di VINCENZO BORGOMEO

# data[].attributes.attachment_link.title
Smog, la mappa della Terra in tempo reale

# data[].attributes.attachment_link.description
L'INQUINAMENTO atmosferico, secondo i dati dell'Organizzazione mondiale della sanità, provoca ogni anno nel mondo circa 7 milioni di vittime ( 500mila circa in Europa). Solo l'8% della popolazione del Pianeta respira aria pulita.

# data[].attributes.body
con Omar e Renato

# data[].attributes.attachment_link.description
Guida al Buio in totale sicurezza un'auto indossando una maschera oscurata con il solo aiuto della "voce guida" di un pilota istruttore certificato.