2018
February Tuesday 20

Bookmark and Share

Related Articles...

MILWAUKEE WI Arduino Meet Up Make Space

WANTED: CORE TEAM MEMBER TO HELP START NON-PROFIT GROUP.

WANTED: Angle Investor Start-Up Funding

Large Industrial Zoned Arduino Make Space Acquired!

Email :

COASMailBox @ gmail.com

MILWAUKEE WI Raspberry Pi Meet Up Make Space

WANTED: CORE TEAM MEMBER TO HELP START NON-PROFIT GROUP.

WANTED: Angle Investor Start-Up Funding

Large Industrial Zoned Raspberry Pi Make Space Acquired!

Email :

COASMailBox @ gmail.com

MILWAUKEE WI Internet of Things (IoT) Meet Up Make Space

WANTED: CORE TEAM MEMBER TO HELP START NON-PROFIT GROUP.

WANTED: Angle Investor Start-Up Funding

Large Industrial Zoned Make Space Acquired!

Full Advanced Fabrication Facility, machine Shop, Welding, Electronics Lab Equipment Acquired!

Email :

COASMailBox @ gmail.com

MILWAUKEE WI Machine Repair, & Installation  - Tier 1 Business Support

Machine Technician Mechanic 20+ Years  Personal Experienced In Industrial Factory Machine Servicing, Rebuilding, Installation And Repair - Plus A 35+ Years Experienced Computer Engineer Service Technician Team Ready For Your Outsourced Market Advantage Needs!

Hartung Industrial - Member - CGI Science & Technology Group

Email :

COASMailBox @ gmail.com

Melbourne Australia IT IS Technology Director Available

Email to disocess a commercial contract or permenet posisition as Cheif Infomration Officer, Chief Technologgy Director, Or other key core team leadership positions. I bring 35+ years of factual based, cutting-edge, proven, computer technology industry insight, science, and professional disciplines to your team as a strong supportive and effective member of the team.

Email :

COASMailBox @ gmail.com

2018 February REVIEW

 

Arduino In Air SONAR
| Gene's Quick Lab Ref

EMBEDDED COMPUTING

2017 NOVEMBER | by Gene Casanova

Senior Systems/Network/Internet Engineer


Ultrasonic Sensor - HC-SR04 Module

I2C stands for "Inter-integrated Circuit Protocol"; a protocol intended to enable multiple "slave" digital integrated circuits (IC chips) to communicate with one or more "master"  IC chips; creating one complete integrated system.

The name I2C translates to "Inter IC".  Sometimes the bus is referred to as "IIC" or "I²C" bus.

The I2C bus was designed by the Philips company during the early 1980s to enable easy communication between components, all located on a circuit board; forming one integrated system.  I2C was developed as a very short distance communications method within a single printed circuit board (PCB).

I2C requires two signal wires to exchange information.


Circuit

Arduino UNO R3 HC SR04 Ultrasonic Schematic

 


Arduino & I2C Module Connection

The 2 I2C signal pins on the differencet Arduino systemboards, are show in the following table:

Arduino UNO HC SR04 Module
Digital I/O 8 TRIG
Digital I/O 7 ECHO
VCC VCC
GND GND

Arduino HC SR04 Sketch

/*
* Arduino And HC SR04 Ultrasonic Sonar Sensor
*
* Experimental Sketch (C Source Code)
*/ int trigPin = 11;    //Trig - green Jumper
int echoPin = 12;    //Echo - yellow Jumper
long duration, cm, inches;
 
void setup() {
  // Serial Port:
  Serial.begin (9600);
  // Set Pin Modes:
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);
}
 
void loop()
{
  // The sensor is triggered by a HIGH pulse of 10 or more microseconds.
  // Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
  digitalWrite(trigPin, LOW);
  delayMicroseconds(5);
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);
 
  // Read signal from the sensor: a HIGH pulse whose
  // duration is the time (in microseconds) from the sending
  // of the ping to the reception of its echo off of an object.
  pinMode(echoPin, INPUT);
  duration = pulseIn(echoPin, HIGH);
 
  // convert the time into a distance
  cm = (duration/2) / 29.1;
  inches = (duration/2) / 74;
 
  Serial.print(inches);
  Serial.print("in, ");
  Serial.print(cm);
  Serial.print("cm");
  Serial.println();
 
  delay(250);
}


NewPing Library

#include <NewPing.h>
 
#define TRIGGER_PIN 11
#define ECHO_PIN 12
#define MAX_DISTANCE 200
 
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.
 
void setup() {
   Serial.begin(9600);
}
 
void loop() {
   delay(50);
   unsigned int uS = sonar.ping_cm();
   Serial.print(uS);
   Serial.println(“cm”);
}


Tutoring

Private tutoring in Milwaukee WI may be available.

Contact to continue the conversation.


Use The Technology Wisely & Keep It Simple

- Cheers!

Gene Casanova


Need More?   Need Help? ........Software, Network, System & Data Center Builder & Developer | Development Services Available - Freelance Small Jobs; To Outsourced Long Term Service Provider Contract Labor Available.

CGI Computer Wares | EST 1979

Send E-MailCONTACT: [click]@CGIComputerWares.com