I check what you asked and HiTecnic works perfectly fine with this code.
Before we will come to conclusion that your sensor is broken i have to be sure that:
- You change BOARD_TYPE in VSC to robocore (Ctrl+Shift+P > Change Husarion project variables > BOARD_TYPE > robocore)
- Your robocore works fine ( Flash very easy program for example only with toggling LED)
- You also have to remember that this sensor is not the highest quality, so object have to be really close.
We don’t have library for Lego RGB sensor, but you can easily create it. If you will have problem with this we will help you