Conversation
Add NXT Sensors subcategorie
The light sensor gives real values. Mode change not supported...
Setting the range of values for determining black and white in reflection mode and in ambient light mode is now different.
|
Implemented support for the simulator. All that remains is to change the svg image for the sensor. Later I'll draw it in Illustrator. |
I'm removing an unnecessary function that doesn't work, which I took from the pelikhan change. It does not apply to this change with the sensor and data input.
|
@jwunderl please look at this change |
|
Conflicts arose because the changes were based on the old version. It takes some time to solve them. |
Fix range - 0..4095
Disable the visibility of ambient blocks so that they are not used, because There is no implementation of disabling LED lighting.
Solving the problem that the field in the simulator and the value from the sensor on the screen could be different. And one more thing...
The changes are aimed at supporting reflection and lighting modes, not raw modes.
Setting the mode so that the sensor starts working in the simulator. Otherwise, it, like a touch sensor, does not create view control, because in the touch sensor this was not necessary. Without this change, lightView would only activate if a sensor with type uart was used in the code.
Support blocks have been removed, which may be available later. The ambient mode has been removed, because There is no implementation of turning off the backlight LED. Now it is always on.
Make sure that the library is not included by default. It will need to be enabled via extensions.
|
@jwunderl look here please? |
|
There are currently two modes of raw reflection values and a reflection mode being implemented. The mode of external consecration is hidden, because The backlight LED must be turned off. I couldn't do it. According to the developers’ scheme, pin 5 should not be supplied with power, but I don’t know how to implement this now. Simulator support is also implemented. The implementation of this sensor does not interfere with the operation of the ev3's other analog sensor, the touch sensor. There is also an issue with the documentation, I will implement it in full later. This is a beta version of the library, but it is already needed now so that children can use this sensor. As I use it, I find problems and solve them. As I use it, I find problems and solve them. |
2023-12-14_23-22-37.mp4https://photos.app.goo.gl/xuUM93NHKnazHCvJ7 |




First support code for nxt light sensor analog sensor. The sensor gives real values. If the sensor is pulled out of the port, then the value is 4096. The default mode is reflection mode with the backlight turned on.
Support for switching modes is not implemented.
Some of the code was taken from here...
#948
I will work on changing the mode of operation.