A hobbyist has modified a suitcase robot to alter its speech patterns in real time based on ambient smoke levels. This project demonstrates a direct hardware-to-software link where physical sensor data controls large language model sampling parameters. The modification allows the robot, named Sparky, to simulate incoherence when exposed to specific gases. This approach offers a practical example of how environmental inputs can dynamically reshape AI output without manual intervention.
MQ-2 sensor data modifies temperature and top_p values instantly
The robot, built by Reddit user u/CreativelyBankrupt, integrates an MQ-2 gas sensor directly into its control system. The sensor detects volatile organic compounds and feeds this data into the LLM sampler. As the concentration of smoke increases, the system adjusts three key generation parameters: temperature, top_p, and top_k. These adjustments occur live, meaning the robot's verbal responses change instantly as the environment shifts.
Under clear conditions, the robot operates with a temperature of 1.0, a top_p value of 0.95, and a top_k of 64. When smoke is detected, the temperature rises to 1.6, top_p increases to 0.99, and top_k expands to 120. The system tracks a smoke phase value between 0 and 10, holding the maximum effect for seven minutes after detection. Every 500 milliseconds, the sensor reads the current gas levels to update these parameters continuously.
The physical modifications include drooping eyes and a voice drawl that activate at the highest smoke phase. A plasma display provides visual feedback to match the altered speech patterns. The MQ-2 sensor cannot distinguish between different sources of smoke, such as incense or cannabis. Both sources trigger the same response curve, treating all detected VOCs as equivalent triggers for the incoherence effect.
The creator stated that the robot's speech genuinely becomes loopier and avoids repetition due to the live parameter shifts. This setup proves that real-time sensor integration can create dynamic, non-deterministic AI behaviors in physical devices. The project highlights a specific use case for hobbyist robotics where environmental interaction drives software logic. The system remains a functional demo rather than a commercial product with defined pricing or availability.
Source: NotebookCheck
