Google Earth Pro N/A serial key or number

Google Earth Pro N/A serial key or number

Google Earth Pro N/A serial key or number

Google Earth Pro N/A serial key or number

Download Google Earth Pro for Free &#; Official License

Download Google Earth Pro for Free &#; Official License. Google Earth is geographical information program and virtual globe software, provided by Google over the last 10 years, which is very useful tool for scientist, GIS analyst, hobbyist and for general public. Where Google Earth basic is Free, while Google previously distributing Google Earth pro version costing you around $, providing more features than the basic version, which can now be downloaded for free getting a valid free licence.

Comparison list &#; Google Earth Basic vs Google Earth Pro version

But before downloading the Google Earth pro version which is actually free for now, we may compare Google Earth Basic version with Google Earth pro version and also list out extra features which makes your life easier going pro.

  • Google Earth provide Screen Resolution print images, while pro version of earth provides Premium high resolution images.
  • Earth enables you to import and Geolocate GIS images manually, while with pro version GIS images can be easily Geo-located Automatically.
  • Also pro version of Google earth makes you to import Super large images file for Overlays, while with basic earth would only limit you to import maximum texture size image files.
  • With all the above comparison, With Google Earth Pro you can make offline HD movies.
  • Can measure area, radius and circumference on the ground.
  • Map multiple points.
  • View demographic, parcel and traffic data layer.
  • Access to advanced importing features and map making tool.
  • Get the large data-set and batch Geocode address.
  • Spreadsheet Import: Ingest up to addresses at a time, assigning Placemarks and style templates in bulk.

Alternative of Google Earth

Check more: No Need of Google Routing

Download Google Earth Pro for Free &#; Grab valid License:

You just need to navigate to the official page of Google Earth, where you have to accept the terms and condition, and allow to download the Earth on your PC, either it is Mac, or Windows or Linux. Here is the link:

After installing it, you need to fill up the pop up window form, with valid email address and a license key. License code is &#;GEPFREE&#;. Your old license key would continue to work, if you already had one.

You may be intersted to see some tutorials on Google Earth:

No doubt Google with all different digital products, aims to makes your life easier and comfortable. There are many organization and individual, which are using Google Earth pro to perform different analysis, planning hikes, planning a new office building, trip to the mountains and placing solar panels on rooftops. Let us discuss by commenting below, where you use Google Earth pro? And how Earth software troubleshoot your work? Do download the Earth pro and enjoy its features.

Author: Akshay Upadhyay

Owner and Director of a Private Limited company which serves individual to large scale industries in the field of Maps and GIS. He is a Gold Medalist in manicapital.com(Spatial Information Technology) and owns some famous Technology blogs and website Know more View all posts by Akshay Upadhyay

Author Akshay UpadhyayCategories GIS, Google EarthTags download, pro for free, valid licenseИсточник: [manicapital.com]
, Google Earth Pro N/A serial key or number

Install & uninstall Google Earth Pro

Important: To use Google Earth Pro and its features, you must have the following versions of the app:

  • Version or newer is required to use Google Earth Pro
  • Version or newer is required to access Google Street View within Google Earth Pro

Toinstall or upgrade to the latest version of Google Earth Pro, download the application

System requirements

In order for Google Earth Pro to run on your computer, you must have all minimum system requirements.

Windows system configuration

Minimum:

  • Operating System: Windows 7
  • CPU: 1GHz or faster
  • System Memory (RAM): 2GB
  • Hard Disk: 2GB free space
  • Internet Connection
  • Graphics Processor: DirectX 9 or OpenGL compatible

Recommended:

  • Operating System: Windows 7 or higher
  • CPU: 2GHz dual-core or faster
  • System Memory (RAM): 4GB
  • Hard Disk: 4GB free space
  • High-Speed Internet Connection
  • Graphics Processor: DirectX 11 or OpenGL  compatible
Mac system configuration

Minimum:

  • Operating System: Mac OS
  • CPU: Intel bit
  • System Memory (RAM): 2GB
  • Hard Disk: 2GB free space
  • Internet Connection
  • Graphics Processor: OpenGL compatible

Recommended:

  • Operating System: Mac OS or later
  • CPU: Intel dual-core bit
  • System Memory (RAM): 4GB
  • Hard Disk: 4GB free space
  • High-Speed Internet Connection
  • Graphics Processor: OpenGL compatible
Linux system configuration

Minimum:

  • Operating System: Ubuntu 14/Fedora 23 (or equivalent) or newer
  • CPU: amd64 compatible, 1GHz
  • System Memory (RAM): 2GB
  • Hard Disk: 2GB free space
  • Internet Connection
  • 3D Graphics Subsystem: OpenGL compatible

Recommended:

  • CPU: amd64 compatible, 2GHz
  • System Memory (RAM): 4GB
  • Hard Disk: 4GB free space
  • High-Speed Internet Connection
  • 3D Graphics Subsystem: OpenGL compatible
  • Screen: x, 32 bit color

Google Earth Pro functions with most recent versions of the Ubuntu and Fedora Linux distributions. Google Earth Pro may run on other popular distributions as well, but due to the wide variety of Linux platforms available, this is not guaranteed.

Install Google Earth Pro

Install Earth Pro on Windows
  1. Download Google Earth Pro.
  2. Double-click the file and follow the installation process.
  3. To open Google Earth Pro, click Start  Programs  Google Earth Pro. Then, click Google Earth Pro.
Install Earth Pro on a Mac
  1. Download Google Earth Pro.
  2. Open "manicapital.com".
  3. Open the "Install Google Earth manicapital.com" file and follow the installation process.
  4. To open Google Earth Pro, open your Applications folder and double-click Google Earth Pro.

Note: During the installation process, Mac OS X will ask for an administrator password. This information is never shared with Google.

Fix installation errors

Before attempting any of the instructions below:

Fix common errors

MSI or .dll error

  1. To uninstall your version of Google Earth Pro, click Control Panel Uninstall a program.
    Note
    : in some versions of Windows, you need to click Control Panel Add or Remove Programs.
  2. Upgrade to the latest version from the Google Earth Pro download link.
Use Earth with firewall or protection software

If you're having trouble connecting to Google Earth Pro and your machine has a software firewall, Google Earth Pro might not be able to access the internet. Examples of common anti-virus software firewalls include:

  • McAfee Personal Firewall Plus (also in McAfee Internet Security Suite)
  • ZoneAlarm
  • Norton Personal Firewall

To help fix firewall issues in your anti-virus software preferences, verify:

  • manicapital.com is not blocked (Windows only)
  • Access to 'port 80' is available for non-browser applications

Note: Before Google Earth Pro software is installed, Mac OS X will ask that you input an administrator password. This information is never shared with Google.

Uninstall Google Earth Pro

Uninstall Earth Pro on a PCUninstall Earth Pro on a Mac
Источник: [manicapital.com]
Google Earth Pro N/A serial key or number

Arduino Cookbook by Michael Margolis

Chapter 4. Serial Communications

Serial communications provide an easy and flexible way for your Arduino board to interact with your computer and other devices. This chapter explains how to send and receive information using this capability.

Chapter 1 described how to connect the Arduino serial port to your computer to upload sketches. The upload process sends data from your computer to Arduino and Arduino sends status messages back to the computer to confirm the transfer is working. The recipes here show how you can use this communication link to send and receive any information between Arduino and your computer or another serial device.

Note

Serial communications are also a handy tool for debugging. You can send debug messages from Arduino to the computer and display them on your computer screen.

The Arduino IDE (described in Recipe ) provides a Serial Monitor (shown in Figure ) to display serial data received by Arduino.

Figure  Arduino Serial Monitor screen

You can also send data from the Serial Monitor to Arduino by entering text in the text box to the left of the Send button. Baud rate is selected using the drop-down box on the bottom right. You can use the drop down labeled “No line ending” to automatically send a carriage return or a combination of a carriage return and a line at the end of each message sent when clicking the Send button.

Your Arduino sketch can use the serial port to indirectly access (usually via a proxy program written in a language like Processing) all the resources (memory, screen, keyboard, mouse, network connectivity, etc.) that your computer has. Your computer can also use the serial link to interact with sensors or other devices connected to Arduino.

Implementing serial communications involves hardware and software. The hardware provides the electrical signaling between Arduino and the device it is talking to. The software uses the hardware to send bytes or bits that the connected hardware understands. The Arduino serial libraries insulate you from most of the hardware complexity, but it is helpful for you to understand the basics, especially if you need to troubleshoot any difficulties with serial communications in your projects.

Serial hardware sends and receives data as electrical pulses that represent sequential bits. The zeros and ones that carry the information that makes up a byte can be represented in various ways. The scheme used by Arduino is 0 volts to represent a bit value of 0, and 5 volts (or volts) to represent a bit value of 1.

Note

Using 0 volts (for 0) and 5 volts (for 1) is very common. This is referred to as the TTL level because that was how signals were represented in one of the first implementations of digital logic, called Transistor-Transistor Logic (TTL).

Boards including the Uno, Duemilanove, Diecimila, Nano, and Mega have a chip to convert the hardware serial port on the Arduino chip to Universal Serial Bus (USB) for connection to the hardware serial port. Other boards, such as the Mini, Pro, Pro Mini, Boarduino, Sanguino, and Modern Device Bare Bones Board, do not have USB support and require an adapter for connecting to your computer that converts TTL to USB. See manicapital.com for more details on these boards.

Some popular USB adapters include:

Some serial devices use the RS standard for serial connection. These usually have a nine-pin connector, and an adapter is required to use them with the Arduino. RS is an old and venerated communications protocol that uses voltage levels not compatible with Arduino digital pins.

You can buy Arduino boards that are built for RS signal levels, such as the Freeduino Serial v (manicapital.com).

RS adapters that connect RS signals to Arduino 5V (or V) pins include the following:

A standard Arduino has a single hardware serial port, but serial communication is also possible using software libraries to emulate additional ports (communication channels) to provide connectivity to more than one device. Software serial requires a lot of help from the Arduino controller to send and receive data, so it’s not as fast or efficient as hardware serial.

The Arduino Mega has four hardware serial ports that can communicate with up to four different serial devices. Only one of these has a USB adapter built in (you could wire a USB-TTL adapter to any of the other serial ports). Table  shows the port names and pins used for all of the Mega serial ports.

Table  Arduino Mega serial ports

Port name

Transmit pin

Receive pin

Serial

1 (also USB)

0 (also USB)

Serial1

18

19

Serial2

16

17

Serial3

14

15

You will usually use the built-in Arduino serial library to communicate with the hardware serial ports. Serial libraries simplify the use of the serial ports by insulating you from hardware complexities.

Sometimes you need more serial ports than the number of hardware serial ports available. If this is the case, you can use an additional library that uses software to emulate serial hardware. Recipes and show how to use a software serial library to communicate with multiple devices.

The hardware or software serial libraries handle sending and receiving information. This information often consists of groups of variables that need to be sent together. For the information to be interpreted correctly, the receiving side needs to recognize where each message begins and ends. Meaningful serial communication, or any kind of machine-to-machine communication, can only be achieved if the sending and receiving sides fully agree how information is organized in the message. The formal organization of information in a message and the range of appropriate responses to requests is called acommunications protocol.

Messages can contain one or more special characters that identify the start of the message—this is called the header. One or more characters can also be used to identify the end of a message—this is called the footer. The recipes in this chapter show examples of messages in which the values that make up the body of a message can be sent in either text or binary format.

Sending and receiving messages in text format involves sending commands and numeric values as human-readable letters and words. Numbers are sent as the string of digits that represent the value. For example, if the value is , the characters 1, 2, 3, and 4 are sent as individual characters.

Binary messages comprise the bytes that the computer uses to represent values. Binary data is usually more efficient (requiring fewer bytes to be sent), but the data is not as human-readable as text, which makes it more difficult to debug. For example, Arduino represents as the bytes 4 and (4 * + = ). If the device you are connecting to sends or receives only binary data, that is what you will have to use, but if you have the choice, text messages are easier to implement and debug.

There are many ways to approach software problems, and some of the recipes in this chapter show two or three different ways to achieve a similar result. The differences (e.g., sending text instead of raw binary data) may offer a different balance between simplicity and efficiency. Where choices are offered, pick the solution that you find easiest to understand and adapt—this will probably be the first solution covered. Alternatives may be a little more efficient, or they may be more appropriate for a specific protocol that you want to connect to, but the “right way” is the one you find easiest to get working in your project.

 Sending Debug Information from Arduino to Your Computer

You want to send text and data to be displayed on your PC or Mac using the Arduino IDE or the serial terminal program of your choice.

This sketch prints sequential numbers on the Serial Monitor:

/* * SerialOutput sketch * Print numbers to the serial port */ void setup() { manicapital.com(); // send and receive at baud } int number = 0; void loop() { manicapital.com("The number is "); manicapital.comn(number); // print the number delay(); // delay half second between numbers number++; // to the next number }

Connect Arduino to your computer just as you did in Chapter 1 and upload this sketch. Click the Serial Monitor icon in the IDE and you should see the output displayed as follows:

The number is 0 The number is 1 The number is 2

To display text and numbers from your sketch on a PC or Mac via a serial link, put the statement in , and then use statements to print the text and values you want to see.

The Arduino Serial Monitor function can display serial data sent from Arduino. To start the Serial Monitor, click the Serial Monitor toolbar icon as shown in Figure  A new window will open for displaying output from Arduino.

Figure  Clicking the Serial Monitor icon to see serial output

Your sketch must call the function before it can use serial input or output. The function takes a single parameter: the desired communication speed. You must use the same speed for the sending side and the receiving side, or you will see gobbledygook (or nothing at all) on the screen. This example and most of the others in this book use a speed of 9, baud (baud is a measure of the number of bits transmitted per second). The 9, baud rate is approximately 1, characters per second. You can send at lower or higher rates (the range is to ,), but make sure both sides use the same speed. The Serial Monitor sets the speed using the baud rate drop down (at the bottom right of the Serial Monitor window in Figure ). If your output looks something like this:

`3??f<ÌxÌ▯▯▯ü`³??f<

you should check that the selected baud rate on your computer matches the rate set by in your sketch.

Note

If your sending and receiving serial speeds are set correctly but you are still getting unreadable text, check that you have the correct board selected in the IDE Tools→Board menu. If you have selected the wrong board, change it to the correct one and upload to the board again.

You can display text using the function. Strings (text within double quotes) will be printed as is (but without the quotes). For example, the following code:

manicapital.com("The number is ");

prints this:

The number is

The values (numbers) that you print depend on the type of variable; see Recipe  for more about this. But for now, printing an integer will print its numeric value, so if the variable is , the following code:

manicapital.comn(number);

will print this:

1

In the example sketch, the number printed will be when the loop starts and will increase by one each time through the loop. The at the end of causes the next print statement to start on a new line.

That should get you started printing text and the decimal value of integers. See Recipe  for more detail on print formatting options.

You may want to consider a third-party terminal program that has more features than Serial Monitor. Displaying data in text or binary format (or both), displaying control characters, and logging to a file are just a few of the additional capabilities available from the many third-party terminal programs. Here are some that have been recommended by Arduino users:

CuteCom

An open source terminal program for Linux

Bray Terminal

A free executable for the PC

GNU screen

An open source virtual screen management program that supports serial communications; included with Linux and Mac OS X

moserial

Another open source terminal program for Linux

PuTTY

An open source SSH program for Windows; supports serial communications

RealTerm

An open source terminal program for the PC

ZTerm

A shareware program for the Mac

In addition, an article in the Arduino wiki explains how to configure Linux to communicate with Arduino using TTY (see manicapital.com).

You can use a liquid crystal display as a serial output device, although it will be very limited in functionality. Check the documentation to see how your display handles carriage returns, as some displays may not automatically advance to a new line after statements.

The Arduino LiquidCrystal library for text LCDs uses underlying print functionality similar to the Serial library, so you can use many of the suggestions covered in this chapter with that library (see Chapter 11).

 Sending Formatted Text and Numeric Data from Arduino

You want to send serial data from Arduino displayed as text, decimal values, hexadecimal, or binary.

You can print data to the serial port in many different formats; here is a sketch that demonstrates all the format options:

/* * SerialFormatting * Print values in various formats to the serial port */ char chrValue = 65; // these are the starting values to print int intValue = 65; float floatValue = ; void setup() { manicapital.com(); } void loop() { manicapital.comn("chrValue: "); manicapital.comn(chrValue); manicapital.comn(chrValue,BYTE); manicapital.comn(chrValue,DEC); manicapital.comn("intValue: "); manicapital.comn(intValue); manicapital.comn(intValue,BYTE); manicapital.comn(intValue,DEC); manicapital.comn(intValue,HEX); manicapital.comn(intValue,OCT); manicapital.comn(intValue,BIN); manicapital.comn("floatValue: "); manicapital.comn(floatValue); delay(); // delay a second between numbers chrValue++; // to the next value intValue++; }

The output (condensed here onto a few lines) is as follows:

chrValue: A A 65 intValue: 65 A 65 41 floatValue: chrValue: B B 66 intValue: 66 B 66 42 floatvalue:

Printing a text string is simple: sends the text string “hello world” to a device at the other end of the serial port. If you want your output to print a new line after the output, use instead of .

Printing numeric values can be more complicated. The way that byte and integer values are printed depends on the type of variable and an optional formatting parameter. The Arduino language is very easygoing about how you can refer to the value of different data types (see Recipe  for more on data types). But this flexibility can be confusing, because even when the numeric values are similar, the compiler considers them to be separate types with different behaviors. For example, printing a will not necessarily produce the same output as printing an of the same value.

Here are some specific examples; all of them create variables that have similar values:

char asciiValue = 'A'; // ASCII A has a value of 65 char chrValue = 65; // an 8 bit character, this also is ASCII 'A' int intValue = 65; // a 16 bit integer set to a value of 65 float floatValue = ; // float with a value of 65

Table  shows what you will see when you print variables using Arduino routines.

Table  Output formats using manicapital.com

Data type

Print

()

Print

()

Print

()

Print

()

Print

()

Print

()

Format of is the same as

Formatting not supported for floating-point values

is the same as

The sketch in this recipe uses a separate line of source code for each print statement. This can make complex print statements bulky. For example, to print the following line:

At 5 seconds: speed = 17, distance =

you’d typically have to code it like this:

manicapital.com("At "); manicapital.com(seconds); manicapital.com(" seconds: speed = "); manicapital.com(speed); manicapital.com(", distance = "); manicapital.comn(distance);

That’s a lot of code lines for a single line of output. You could combine them like this:

manicapital.com("At "); manicapital.com(seconds); manicapital.com(" seconds, speed = "); manicapital.com(speed); manicapital.com(", distance = ");manicapital.comn(distance);

Or you could use the insertion-style capability of the compiler used by Arduino to format your print statements. You can take advantage of some advanced C++ capabilities (streaming insertion syntax and templates) that you can use if you declare a streaming template in your sketch. This is most easily achieved by including the Streaming library developed by Mikal Hart. You can read more about this library and download the code from Mikal’s website.

If you use the Streaming library, the following gives the same output as the lines shown earlier:

Serial << "At " << seconds << " seconds, speed = " << speed << ", distance = " << distance;

 Receiving Serial Data in Arduino

You want to receive data on Arduino from a computer or another serial device; for example, to have Arduino react to commands or data sent from your computer.

It’s easy to receive 8-bit values (chars and bytes), because the functions use 8-bit values. This sketch receives a digit (single characters 0 through 9) and blinks the LED on pin 13 at a rate proportional to the received digit value:

/* * SerialReceive sketch * Blink the LED at a rate proportional to the received digit value */ const int ledPin = 13; // pin the LED is connected to int blinkRate=0; // blink rate stored in this variable void setup() { manicapital.com(); // Initialize serial port to send and receive at baud pinMode(ledPin, OUTPUT); // set this pin as output } void loop() { if ( manicapital.comble()) // Check to see if at least one character is available { char ch = manicapital.com(); if(ch >= '0' && ch <= '9') // is this an ascii digit between 0 and 9? { blinkRate = (ch - '0'); // ASCII value converted to numeric value blinkRate = blinkRate * ; // actual blinkrate is mS times received digit } } blink(); } // blink the LED with the on and off times determined by blinkRate void blink() { digitalWrite(ledPin,HIGH); delay(blinkRate); // delay depends on blinkrate value digitalWrite(ledPin,LOW); delay(blinkRate); }

Upload the sketch and send messages using the Serial Monitor. Open the Serial Monitor by clicking the Monitor icon (see Recipe ) and type a digit in the text box at the top of the Serial Monitor window. Clicking the Send button will send the character typed into the text box; you should see the blink rate change.

Converting the received ASCII characters to numeric values may not be obvious if you are not familiar with the way ASCII represents characters. The following converts the character to its numeric value:

blinkRate = (ch - '0'); // ASCII value converted to numeric value

This is done by subtracting 48, because 48 is the ASCII value of the digit 0. For example, if is representing the character 1, its ASCII value is The expression is the same as . This equals 1, which is the numeric value of the character 1.

In other words, the expression is the same as ; this converts the ASCII value of the variable to a numeric value.

To get a clearer idea of the relationship between the ASCII values of characters representing the digits 0 through 9 and their actual numeric values, see the ASCII table in Appendix G.

Receiving numbers with more than one digit involves accumulating characters until a character that is not a valid digit is detected. The following code uses the same and functions as those shown earlier, but it gets digits until the newline character is received. It uses the accumulated value to set the blink rate.

Note

The newline character (ASCII value 10) can be appended automatically each time you click Send. The Serial Monitor has a drop-down box at the bottom of the Serial Monitor screen (see Figure ); change the option from “No line ending” to “Newline.”

Change the code that the code follows. Enter a value such as into the Monitor text box and click Send, and the blink delay will be set to milliseconds:

int value; void loop() { if( manicapital.comble()) { char ch = manicapital.com(); if(ch >= '0' && ch <= '9') // is this an ascii digit between 0 and 9? { value = (value * 10) + (ch - '0'); // yes, accumulate the value } else if (ch == 10) // is the character the newline character { blinkRate = value; // set blinkrate to the accumulated value manicapital.comn(blinkRate); value = 0; // reset val to 0 ready for the next sequence of digits } } blink(); }

Each digit is converted from its ASCII value to its numeric value. Because the numbers are decimal numbers (base 10), each successive number is multiplied by For example, the value of the number is 2 * + 3 * 10 + 4. The code to accomplish that is:

if(ch >= '0' && ch <= '9') // is this an ascii digit between 0 and 9? { value = (value * 10) + (ch - '0'); // yes, accumulate the value }

If you want to handle negative numbers, your code needs to recognize the minus () sign. For example:

int value = 0; int sign = 1; void loop() { if( manicapital.comble()) { char ch = manicapital.com(); if(ch >= '0' && ch <= '9') // is this an ascii digit between 0 and 9? value = (value * 10) + (ch - '0'); // yes, accumulate the value else if( ch == '-') sign = -1; else // this assumes any char not a digit or minus sign terminates the value { value = value * sign ; // set value to the accumulated value manicapital.comn(value); value = 0; // reset value to 0 ready for the next sequence of digits sign = 1; } } }

Another approach to converting text strings representing numbers is to use the C language conversion function called (for variables) or (for variables). These obscurely named functions convert a string into integers or long integers. To use them you have to receive and store the entire string in a character array before you can call the conversion function.

This code fragment terminates the incoming digits on any character that is not a digit (or if the buffer is full):

const int MaxChars = 5; // an int string contains up to 5 digits and // is terminated by a 0 to indicate end of string char strValue[MaxChars+1]; // must be big enough for digits and terminating null int index = 0; // the index into the array storing the received digits void loop() { if( manicapital.comble()) { char ch = manicapital.com(); if(index < MaxChars && ch >= '0' && ch <= '9'){ strValue[index++] = ch; // add the ASCII character to the string; } else { // here when buffer full or on the first non digit strValue[index] = 0; // terminate the string with a 0 blinkRate = atoi(strValue); // use atoi to convert the string to an int index = 0; } } blink(); }

is a numeric string built up from characters received from the serial port.

Warning

See Recipe  for information about character strings.

(short for ASCII to integer) is a function that converts a character string to an integer ( converts to a long integer).

 Sending Multiple Text Fields from Arduino in a Single Message

You want to send a message that contains more than one piece of information (field). For example, your message may contain values from two or more sensors. You want to use these values in a program such as Processing, running on your PC or Mac.

The easiest way to do this is to send a text string with all the fields separated by a delimiting (separating) character, such as a comma:

// CommaDelimitedOutput sketch void setup() { manicapital.com(); } void loop() { int value1 = 10; // some hardcoded values to send int value2 = ; int value3 = ; manicapital.com('H'); // unique header to identify start of message manicapital.com(","); manicapital.com(value1,DEC); manicapital.com(","); manicapital.com(value2,DEC); manicapital.com(","); manicapital.com(value3,DEC); manicapital.com(","); // note that a comma is sent after the last field manicapital.comn(); // send a cr/lf delay(); }

Here is the Processing sketch that reads this data from the serial port:

//manicapital.com (Processing Sketch) import manicapital.com*; Serial myPort; // Create object from Serial class char HEADER = 'H'; // character to identify the start of a message short LF = 10; // ASCII linefeed short portIndex = 0; // select the com port, 0 is the first port void setup() { size(, ); // WARNING! // If necessary, change the definition of portIndex at the top of this // sketch to the desired serial port. // println(manicapital.com()); println(" Connecting to -> " + manicapital.com()[portIndex]); myPort = new Serial(this,manicapital.com()[portIndex], ); } void draw() { } void serialEvent(Serial p) { String message = manicapital.comringUntil(LF); // read serial data if(message != null) { print(message); String [] data = manicapital.com(","); // Split the comma-separated message if(data[0].charAt(0) == HEADER) // check for header character in the first field { for( int i = 1; i < manicapital.com-1; i++) // skip the header and terminating cr and lf { int value = manicapital.comnt(data[i]); println("Value" + i + " = " + value); //Print the value for each field } println(); } } }

The code in this recipe’s Solution will send the following text string to the serial port (indicates a carriage return and indicates a line feed):

H10,,,\r\n

You must choose a separating character that will never occur within actual data; if your data consists only of numeric values, a comma is a good choice for a delimiter. You may also want to ensure that the receiving side can determine the start of a message to make sure it has all the data for all the fields. You do this by sending a header character to indicate the start of the message. The header character must also be unique; it should not appear within any of the data fields and it must also be different from the separator character. The example here uses an uppercase H to indicate the start of the message. The message consists of the header, three comma-separated numeric values as ASCII strings, and a carriage return and line feed.

The carriage return and line-feed characters are sent whenever Arduino prints using the function, and this is used to help the receiving side know that the full message string has been received. A comma is sent after the last numerical value to aid the receiving side in detecting the end of the value.

The Processing code reads the message as a string and uses the Java method to create an array from the comma-separated fields.

Note

In most cases, the first serial port will be the one you want when using a Mac and the last serial port will be the one you want when using Windows. The Processing sketch includes code that shows the ports available and the one currently selected—check that this is the port connected to Arduino.

The Processing website provides more information on installing and using this programming environment. See manicapital.com

 Receiving Multiple Text Fields in a Single Message in Arduino

You want to receive a message that contains more than one field. For example, your message may contain an identifier to indicate a particular device (such as a motor or other actuator) and what value (such as speed) to set it to.

Arduino does not have the function used in the Processing code in Recipe , but the functionality can be implemented as shown in this recipe. The following code receives a message with three numeric fields separated by commas. It uses the technique described in Recipe  for receiving digits, and it adds code to identify comma-separated fields and store the values into an array:

/* * SerialReceiveMultipleFields sketch * This code expects a message in the format: 12,, * This code requires a newline character to indicate the end of the data * Set the serial monitor to send newline characters */ const int NUMBER_OF_FIELDS = 3; // how many comma separated fields we expect int fieldIndex = 0; // the current field being received int values[NUMBER_OF_FIELDS]; // array holding values for all the fields void setup() { manicapital.com(); // Initialize serial port to send and receive at baud } void loop() { if( manicapital.comble()) { char ch = manicapital.com(); if(ch >= '0' && ch <= '9') // is this an ascii digit between 0 and 9? { // yes, accumulate the value values[fieldIndex] = (values[fieldIndex] * 10) + (ch - '0'); } else if (ch == ',') // comma is our separator, so move on to the next field { if(fieldIndex < NUMBER_OF_FIELDS-1) fieldIndex++; // increment field index } else { // any character not a digit or comma ends the acquisition of fields // in this example it's the newline character sent by the Serial Monitor manicapital.com( fieldIndex +1); manicapital.comn(" fields received:"); for(int i=0; i <= fieldIndex; i++) { manicapital.comn(values[i]); values[i] = 0; // set the values to zero, ready for the next message } fieldIndex = 0; // ready to start over } } }

This sketch accumulates values (as explained in Recipe ), but here each value is added to an array (which must be large enough to hold all the fields) when a comma is received. A character other than a digit or comma (such as the newline character; see Recipe ) triggers the printing of all the values that have been stored in the array.

Another approach is to use a library called TextFinder, which is available from the Arduino Playground. TextFinder was created to extract information from web streams (see Chapter 15), but it works just as well with serial data. The following sketch uses TextFinder to provide similar functionality to the previous sketch:

#include <TextFinder.h> TextFinder finder(Serial); const int NUMBER_OF_FIELDS = 3; // how many comma-separated fields we expect int fieldIndex = 0; // the current field being received int values[NUMBER_OF_FIELDS]; // array holding values for all the fields void setup() { manicapital.com(); // Initialize serial port to send and receive at baud } void loop() { for(fieldIndex = 0; fieldIndex < 3; fieldIndex ++) { values[fieldIndex] = manicapital.comue(); // get a numeric value } manicapital.com( fieldIndex); manicapital.comn(" fields received:"); for(int i=0; i < fieldIndex; i++) { manicapital.comn(values[i]); } fieldIndex = 0; // ready to start over }

You can download the TextFinder library from manicapital.com

Here is a summary of the methods supported by TextFinder (not all are used in the preceding example):

Reads from the stream until the given target is found. It returns if the target string is found. A return of means the data has not been found anywhere in the stream and that there is no more data available. Note that TextFinder takes a single pass through the stream; there is no way to go back to try to find or get something else (see the method).

Similar to the method, but the search will stop if the terminate string is found. Returns only if the target is found. This is useful to stop a search on a keyword or terminator. For example:

manicapital.comtil("target", "\n");

will try to seek to the string , but will stop at a newline character so that your sketch can do something else if the target is not found.

Returns the first valid (long) integer value. Leading characters that are not digits or a minus sign are skipped. The integer is terminated by the first nondigit character following the number. If no digits are found, the function returns .

Same as , but the given within the numeric value is ignored. This can be helpful when parsing a single numeric value that uses a comma between blocks of digits in large numbers, but bear in mind that text values formatted with commas cannot be parsed as a comma-separated string.

The version of .

Finds the and then puts the incoming characters into the given buffer until the is detected. The end of the string is determined by a match of a character to the first . Strings longer than the given are truncated to fit. The function returns the number of characters placed in the buffer ( means no valid data was found).

Chapter 15 provides more examples of TextFinder used to find and extract data from a stream.

 Sending Binary Data from Arduino

You need to send data in binary format, because you want to pass information with the fewest number of bytes or because the application you are connecting to only handles binary data.

This sketch sends a header followed by two integer (bit) values as binary data. The values are generated using the Arduino function (see Recipe ):

/* * SendBinary sketch * Sends a header followed by two random integer values as binary data. */ int intValue; // an integer value (16 bits) void setup() { manicapital.com(); } void loop() { manicapital.com('H'); // send a header character // send a random integer intValue = random(); // generate a random number between 0 and // send the two bytes that comprise an integer manicapital.com(lowByte(intValue), BYTE); // send the low byte manicapital.com(highByte(intValue), BYTE); // send the high byte // send another random integer intValue = random(); // generate a random number between 0 and // send the two bytes that comprise an integer manicapital.com(lowByte(intValue), BYTE); // send the low byte manicapital.com(highByte(intValue), BYTE); // send the high byte delay(); }

Sending binary data requires careful planning, because you will get gibberish unless the sending side and the receiving side understand and agree exactly how the data will be sent. Unlike text data, where the end of a message can be determined by the presence of the terminating carriage return (or another unique character you pick), it may not be possible to tell when a binary message starts or ends by looking just at the data—data that can have any value can therefore have the value of a header or terminator character.

This can be overcome by designing your messages so that the sending and receiving sides know exactly how many bytes are expected. The end of a message is determined by the number of bytes sent rather than detection of a specific character. This can be implemented by sending an initial value to say how many bytes will follow. Or you can fix the size of the message so that it’s big enough to hold the data you want to send. Doing either of these is not always easy, as different platforms and languages can use different sizes for the binary data types—both the number of bytes and their order may be different from Arduino. For example, Arduino defines an as two bytes, but Processing (Java) defines an as four bytes ( is the Java type for a bit integer). Sending an value as text (as seen in earlier text recipes) simplifies this problem because each individual digit is sent as a sequential digit (just as the number is written). The receiving side recognizes when the value has been completely received by a carriage return or other nondigit delimiter. Binary transfers can only know about the composition of a message if it is defined in advance or specified in the message.

This recipe’s Solution requires an understanding of the data types on the sending and receiving platforms and some careful planning. Recipe  shows example code using the Processing language to receive these messages.

Sending single bytes is easy; use. To send an integer from Arduino you need to send the low and high bytes that make up the integer (see Recipe  for more on data types). You do this using the and functions (see Recipe ):

manicapital.com(lowByte(intValue), BYTE); manicapital.com(highByte(intValue), BYTE);

The preceding code sends the low byte followed by the high byte. The code can also be written without the parameter (see Recipe ), but using the parameter is a useful reminder (when you come back later to make changes, or for others who may read your code) that your intention is to send bytes rather than ASCII characters.

Sending a long integer is done by breaking down the four bytes that comprise a in two steps. The is first broken into two bit integers; each is then sent using the method for sending integers described earlier:

int longValue = ; int intValue;

First you send the lower bit integer value:

intValue = longValue && 0xFFFF; // get the value of the lower 16 bits manicapital.com(lowByte(intVal), BYTE); manicapital.com(highByte(intVal), BYTE);

Then you send the higher bit integer value:

intValue = longValue >> 16; // get the value of the higher 16 bits manicapital.com(lowByte(intVal), BYTE); manicapital.com(highByte(intVal), BYTE);

You may find it convenient to create functions to send the data. Here is a function that uses the code shown earlier to print a bit integer to the serial port:

// function to send the given integer value to the serial port void sendBinary(int value) { // send the two bytes that comprise a two byte (16 bit) integer manicapital.com(lowByte(value), BYTE); // send the low byte manicapital.com(highByte(value), BYTE); // send the high byte }

The following function sends the value of a (4-byte) integer by first sending the two low (rightmost) bytes, followed by the high (leftmost) bytes:

// function to send the given long integer value to the serial port void sendBinary(long value) { // first send the low 16 bit integer value int temp = value && 0xFFFF; // get the value of the lower 16 bits sendBinary(temp); // then send the higher 16 bit integer value: temp = value >> 16; // get the value of the higher 16 bits sendBinary(temp); }

These functions to send binary and values have the same name: . The compiler distinguishes them by the type of value you use for the parameter. If your code calls with a 2-byte value, the version declared as will be called. If the parameter is a value, the version declared as will be called. This behavior is calledfunction overloading. Recipe  provides another illustration of this; the different functionality you saw in is due to the compiler distinguishing the different variable types used.

You can also send binary data using structures. Structures are a mechanism for organizing data, and if you are not already familiar with their use you may be better off sticking with the solutions described earlier. For those who are comfortable with the concept of structure pointers, the following is a function that will send the bytes within a structure to the serial port as binary data:

void sendStructure( char *structurePointer, int structureLength) { int i; for (i = 0 ; i < structureLength ; i++) manicapital.com(structurePointer[i], BYTE); } sendStructure((char *)&myStruct, sizeof(myStruct));

Sending data as binary bytes is more efficient than sending data as text, but it will only work reliably if the sending and receiving sides agree exactly on the composition of the data. Here is a summary of the important things to check when writing your code:

Variable size

Make sure the size of the data being sent is the same on both sides. An integer is 2 bytes on Arduino, 4 bytes on most other platforms. Always check your programming language’s documentation on data type size to ensure agreement. There is no problem with receiving a 2-byte Arduino integer as a 4-byte integer in Processing as long as Processing expects to get only two bytes. But be sure that the sending side does not use values that will overflow the type used by the receiving side.

Byte order

Make sure the bytes within an or are sent in the same order expected by the receiving side.

Synchronization

Ensure that your receiving side can recognize the beginning and end of a message. If you start listening in the middle of a transmission stream, you will not get valid data. This can be achieved by sending a sequence of bytes that won’t occur in the body of a message. For example, if you are sending binary values from , these can only range from 0 to 1,, so the most significant byte must be less than 4 (the value of 1, is stored as the bytes 3 and ); therefore, there will never be data with two consecutive bytes greater than 3. So, sending two bytes of 4 (or any value greater than 3) cannot be valid data and can be used to indicate the start or end of a message.

Structure packing

If you send or receive data as structures, check your compiler documentation to make sure the packing is the same on both sides. Packing is the padding that a compiler uses to align data elements of different sizes in a structure.

Flow control

Either choose a transmission speed that ensures that the receiving side can keep up with the sending side, or use some kind of flow control. Flow control is a handshake that tells the sending side that the receiver is ready to get more data.

 Receiving Binary Data from Arduino on a Computer

You want to respond to binary data sent from Arduino in a programming language such as Processing. For example, you want to respond to Arduino messages sent in Recipe 

This recipe’s Solution depends on the programming environment you use on your PC or Mac. If you don’t already have a favorite programming tool and want one that is easy to learn and works well with Arduino, Processing is an excellent choice.

Here are the two lines of Processing code to read a byte, taken from the Processing example (see this chapter’s introduction):

if ( manicapital.comble() > 0) { // If data is available, val = manicapital.com(); // read it and store it in val

As you can see, this is very similar to the Arduino code you saw in earlier recipes.

The following is a Processing sketch that sets the size of a rectangle proportional to the integer values received from the Arduino sketch in Recipe 

/* * ReceiveBinaryData_P * * portIndex must be set to the port connected to the Arduino */ import manicapital.com*; Serial myPort; // Create object from Serial class short portIndex = 1; // select the com port, 0 is the first port char HEADER = 'H'; int value1, value2; // Data received from the serial port void setup() { size(, ); // Open whatever serial port is connected to Arduino. String portName = manicapital.com()[portIndex]; println(manicapital.com()); println(" Connecting to -> " + manicapital.com()[portIndex]); myPort = new Serial(this, portName, ); } void draw() { // read the header and two binary *(16 bit) integers: if ( manicapital.comble() >= 5) // If at least 5 bytes are available, { if( manicapital.com() == HEADER) // is this the header { value1 = manicapital.com(); // read the least significant byte value1 = manicapital.com() * + value1; // add the most significant byte value2 = manicapital.com(); // read the least significant byte value2 = manicapital.com() * + value2; // add the most significant byte println("Message received: " + value1 + "," + value2); } } background(); // Set background to white fill(0); // set fill to black // draw rectangle with coordinates based on the integers received from Arduino rect(0, 0, value1,value2); }

The Processing language influenced Arduino, and the two are intentionally similar. The function in Processing is used to handle one-time initialization, just like in Arduino. Processing has a display window, and sets its size to × pixels with the call to .

The line selects the serial port—in Processing, all available serial ports are contained in the object and this example uses the value of a variable called . prints all the available ports, and the line opens the port selected as . Ensure that you set to the serial port that is connected to your Arduino.

The function in Processing works like in Arduino; it is called repeatedly. The code in checks if data is available on the serial port; if so, bytes are read and converted to the integer value represented by the bytes. A rectangle is drawn based on the integer values received.

 Sending Binary Values from Processing to Arduino

You want to send binary bytes, integers, or long values from Processing to Arduino. For example, you want to send a message consisting of a message identifier “tag,” an index (perhaps indicating a particular device attached to Arduino), and a bit value.

Use this code:

/* SendingBinaryToArduino * Language: Processing */ import manicapital.com*; Serial myPort; // Create object from Serial class public static final char HEADER = '|'; public static final char MOUSE = 'M'; void setup() { size(, ); String portName = manicapital.com()[0]; myPort = new Serial(this, portName, ); } void draw(){ } void serialEvent(Serial p) { // handle incoming serial data String inString = manicapital.comringUntil('\n'); if(inString != null) { println( inString ); // echo text string from Arduino } }

When the mouse is clicked in the Processing window, will be called with equal to the vertical position of the mouse in the window when clicked and equal to the horizontal position. The window size was set to ,, so would fit into a single byte and would fit into two bytes:

void mousePressed() { int index = mouseY; int value = mouseX; sendMessage(MOUSE, index, value); }

sends a header, tag, and index as single bytes. It sends the value as two bytes, with the most significant byte first:

void sendMessage(char tag, int index, int value){ // send the given index and value to the serial port manicapital.com(HEADER); manicapital.com(tag); manicapital.com(index); char c = (char)(value / ); // msb manicapital.com(c); c = (char)(value & 0xff); // lsb manicapital.com(c); }

The Arduino code to receive this and echo the results back to Processing is:

//BinaryDataFromProcessing

The next three s must mirror the definitions used in the sending program:

#define HEADER '|' #define MOUSE 'M' #define MESSAGE_BYTES 5 // the total bytes in a message void setup() { manicapital.com(); } void loop(){

The check to ensure that at least have been received ensures that we don’t try to process the message until all the required data is available:

if ( manicapital.comble() >= MESSAGE_BYTES) {

Only read the rest of the message if a valid header has been received:

if( manicapital.com() == HEADER) { char tag = manicapital.com(); if(tag == MOUSE) { int index = manicapital.com(); // this was sent as a char but it's ok to use it as an int

The next lines convert the two bytes back to an integer. restores the most significant byte to its original value. Compare this to Processing code that sent the two bytes comprising the value:

int val = manicapital.com() * ; val = val + manicapital.com(); manicapital.com("Received mouse msg, index = "); manicapital.com(index); manicapital.com(", value "); manicapital.comn(val); } else {

If the code gets here, the tag was not recognized. This helps you to ignore data that may be incomplete or corrupted:

manicapital.com("got message with unknown tag "); manicapital.comn(tag); } } } }

This code is similar to the Processing code in the previous recipes, with the addition of a function called . In this example, the function is called with three parameters: a tag, an index, and a value. The function first sends the header character to identify the start of the message. Then the single byte index is sent, followed by the two bytes that comprise the integer value. You can make your own version of this function to send the combination of values that you need for your application.

 Sending the Value of Multiple Arduino Pins

You want to send groups of binary bytes, integers, or long values from Arduino. For example, you may want to send the values of the digital and analog pins to Processing.

This recipe sends a header followed by an integer containing the bit values of digital pins 2 to This is followed by six integers containing the values of analog pins 0 through 5. Chapter 5

Источник: [manicapital.com]
.

What’s New in the Google Earth Pro N/A serial key or number?

Screen Shot

System Requirements for Google Earth Pro N/A serial key or number

Add a Comment

Your email address will not be published. Required fields are marked *