How to print lightvalues

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

New User
Posts: 16
Joined: Thu Jun 15, 2017 1:52 pm

How to print lightvalues

Postby poulabildgaard » Thu Jun 15, 2017 1:58 pm

Hi. I am new to EV3 and have lots to learn, so please be patient :)
In NXT i could simplly write: System.out.println(LightSensor.getLightValue()) and it worked perfectly. But using EV3 I simply don't understand it. How do I list the values collected by the LightSensor (or actually the ColorSensor)? I'm sure it perfectly simple, but thanks fo rany help. I would appreciate a full code if possible.


User avatar
leJOS Team Member
Posts: 5997
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: How to print lightvalues

Postby gloomyandy » Thu Jun 15, 2017 2:07 pm

the following explains how the sensor framework works... ... Framework/
The EV3 doc gives details of the modes supported by the various sensors... ... ensor.html

Once you have obtained the readings using the fetch sample call, you simply display them using standard Java I/O
leJOS news

Return to “EV3 Software”

Who is online

Users browsing this forum: No registered users and 1 guest