The library supplies a simple way to diagnose errors with the TCLab device in
a function called diagnose
, which is called as follows:
from tclab import diagnose
diagnose()
This function will attempt to find the Arduino device, make a connection and attempt to exercise the full command set of the device to make sure everything is working correctly.
The above code can also be run from a terminal by using
python -m tclab
- First confirm that the device is correctly plugged in.
- Plug it out and back in
- Try a different port.
- If no configuration has worked, you may need to install drivers (see below)
A device has been found but you get an error which mentions "Access denied".
If you are using Windows, this can be resolved by going to Device Manager and selecting a different port for the device. If the device shows up incorrecty in the Device Manager, you may need to install drivers (see below)
You may have plugged both of the USB leads into one computer. The device works best when the barrel-ended jack is plugged into a separate power supply or a different computer.
You may only have plugged in your device into your computer using one cable. Your device needs to be plugged in to your computer and requires another connection to a power supply to power the heaters.
If you are using Windows 10, the Arduino board should connect without additional drivers required.
For Arduino clones using the CH340G, CH34G or CH34X chipset you may need additional drivers. Only install these if you see a message saying "No Arduino device found." when connecting.
It is usually best to use the most recent version of the Arduino firmware, available from the TCLab-Sketch repository.
If you find that the code supplied in the documentation gives errors about functions not being found, or if you installed tclab a long time ago, you need to update the TCLab library. This can be done with the command
pip install --update tclab