microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 25 forks source link

sampling time and gain in color sensor #554

Open mmoskal opened 3 years ago

mmoskal commented 3 years ago

The color sensor I'm using has a programmable GAIN (1x, 2x, 4x, 8x I think) and sampling time (2.4ms - 700ms). I wonder if many other color sensors would have such a thing? Should we add that as optional configuration registers? I was thinking gain: u16.16 and sampling_time: u32 us. If the values the user gets are out of range, they could fiddle with these settings.

mmoskal commented 3 years ago

I guess we could instead have a generic sensitivity: u16.16? That could somehow translate to gain and sampling time.

jamesadevine commented 3 years ago

I think a generic option would be better? I assume you’re thinking in the sensor base class?

James


From: Michał Moskal @.> Sent: Friday, August 6, 2021 7:15:27 PM To: microsoft/jacdac @.> Cc: James Devine @.>; Assign @.> Subject: Re: [microsoft/jacdac] sampling time and gain in color sensor (#554)

I guess we could instead have a generic sensitivity: u16.16? That could somehow translate to gain and sampling time.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fjacdac%2Fissues%2F554%23issuecomment-894434287&data=04%7C01%7Ct-jamdev%40microsoft.com%7C2aefe060c10544bee5bf08d959062ae6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637638705403926321%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ObahRieKdIMZeqTTHE7kK0fYr6CO%2BRgciFGlIJTQi24%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABEF4KIZVMTR2HMC5DLKXW3T3QRD7ANCNFSM5BWL6KYA&data=04%7C01%7Ct-jamdev%40microsoft.com%7C2aefe060c10544bee5bf08d959062ae6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637638705403936315%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Z%2BUdr5iRcUTs7FtnPEJIYb18%2BYKncR7mVkIbQMr%2Fcts%3D&reserved=0.