Text blocks

Next, place three text blocks after the sensor blocks; these are found under the red data operations tab in the programming palate:

These blocks allow us to print the sensor data next to a static label on the EV3 screen. For example, in our program, we will print the word UTC: followed by the UTC value read from the dGPS on one line on the EV3 screen. Each of the three text blocks pairs with one of the dGPS sensor blocks to merge the sensor's value with the label so it can be printed to the EV3 screen.

We can now set up the labels. They correspond to the data being printed on the EV3 screen, so we will have one label that says UTC:, one that says Lat:, and one for Lon:. Type the labels into the first input of each text block. When finished, they look like this:

With the labels in place, we can start matching the sensor data to each text block. The first sensor block reads the UTC from the dGPS. Plug the data wire from this sensor block into the second input of the text block that you set up with the UTC: label:

Repeat this process for the remaining two block pairs; the dGPS block that reads latitude should be paired to the text block with the Lat: label, and the block that reads longitude should be paired to the text block with the Lon: label.

When all of the sensor blocks and text blocks are correctly paired, the program looks like this:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.105.124