Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review Sensor framework #246

Open
jabrena opened this issue Apr 24, 2017 · 3 comments
Open

Review Sensor framework #246

jabrena opened this issue Apr 24, 2017 · 3 comments
Assignees

Comments

@jabrena
Copy link
Member

jabrena commented Apr 24, 2017

http://stackoverflow.com/questions/5192226/what-is-the-best-practice-to-modify-an-object-passed-to-a-method

@jabrena jabrena added this to the v0.7.0 milestone Apr 29, 2017
@jabrena
Copy link
Member Author

jabrena commented May 8, 2017

@jabrena
Copy link
Member Author

jabrena commented May 8, 2017

//get a port instance
Port port = LocalEV3.get().getPort("S2");

// Get an instance of the Ultrasonic EV3 sensor
SensorModes sensor = new EV3UltrasonicSensor(port);

// get an instance of this sensor in measurement mode
SampleProvider distance= sensor.getMode("Distance");

// initialize an array of floats for fetching samples.
// Ask the SampleProvider how long the array should be
float[] sample = new float[distance.sampleSize()];

// fetch a sample
while(true)
distance.fetchSample(sample, 0);

@jabrena
Copy link
Member Author

jabrena commented May 8, 2017

@jabrena jabrena modified the milestones: v0.8.0, v0.7.0 May 27, 2017
@jabrena jabrena modified the milestones: v0.8.0, v1.0.0 Mar 13, 2018
@jabrena jabrena removed this from the v1.0.0 milestone May 7, 2018
@jabrena jabrena self-assigned this Aug 18, 2019
@jabrena jabrena added this to the v1.1.0 milestone Aug 18, 2019
@jabrena jabrena removed this from the v1.1.0 milestone Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant