25 KiB
Troubleshooting Guide
Dis guide go help you solve common wahala wen you dey work wit di IoT for Beginners curriculum. Wahala dem dey organized by category so e go easy to waka through dem.
Table of Contents
- Installation Issues
- Hardware Issues
- Connectivity Issues
- Sensor and Actuator Issues
- Development Environment Issues
- Performance Issues
- Common Error Messages
- Getting Help
Installation Issues
Python Installation
Problem: Python version dey too old
Error: Python 3.6 or higher is required
Solution:
- Download di latest Python 3 from python.org
- For Windows installation, make sure say you check "Add Python to PATH"
- Verify di installation:
python3 --version
Problem: Plenty Python versions dey cause wahala
Symptoms: Di wrong Python version dey run, packages dey install for wrong place
Solution:
- Windows: Use
py -3instead ofpythonto explicitly call Python 3 - macOS/Linux: Use
python3instead ofpython - Always create and use virtual environments for projects
Problem: pip command no dey work
Error: 'pip' is not recognized as an internal or external command
Solution:
- Try
pip3instead ofpip - Or use
python -m piporpython3 -m pip - Make sure say Python dey added to PATH (reinstall Python and check di option)
VS Code and Extensions
Problem: Pylance extension no dey work
Symptoms: No Python IntelliSense, code completion, or type checking
Solution:
- Open VS Code Command Palette (
Ctrl+Shift+PorCmd+Shift+P) - Run "Python: Select Interpreter"
- Choose di correct Python interpreter (virtual environment if you dey use one)
- Reload VS Code window
Problem: VS Code no dey detect virtual environment
Symptoms: Wrong Python interpreter selected
Solution:
- Make sure say you don activate di virtual environment for terminal
- Open Command Palette and run "Python: Select Interpreter"
- Select di interpreter from
.venvfolder - Check di status bar (bottom left) make e show di correct Python version
PlatformIO (Wio Terminal)
Problem: PlatformIO installation dey fail
Error: Different errors dey happen during PlatformIO installation
Solution:
- Make sure say VS Code dey up to date
- Install di C/C++ extension first
- Restart VS Code after you don install PlatformIO
- Check your internet connection (PlatformIO dey download big big files)
Problem: Board no dey detected by PlatformIO
Symptoms: You no fit upload code to Wio Terminal
Solution:
- Try different USB cable (some cables na charge-only)
- Check Device Manager (Windows) or
ls /dev/tty*(macOS/Linux) - Install or update USB drivers
- Try different USB port
- Slide di power switch for Wio Terminal two times sharp sharp to enter bootloader mode
Problem: Compilation errors for PlatformIO
Error: fatal error: Arduino.h: No such file or directory
Solution:
- Delete di
.piofolder inside your project - Run "PlatformIO: Rebuild" from Command Palette
- Make sure di
platformio.iniget correct board configuration:[env:seeed_wio_terminal] platform = atmelsam board = seeed_wio_terminal framework = arduino
Grove Libraries
Problem: Grove library no dey import for Raspberry Pi
Error: ModuleNotFoundError: No module named 'grove'
Solution:
- Reinstall Grove libraries:
cd ~ git clone https://github.com/Seeed-Studio/grove.py cd grove.py sudo pip3 install . - If you dey use virtual environment, you fit need install am globally or copy libraries
- Check if I2C don enable:
sudo raspi-config nonint do_i2c 0
Problem: Grove sensor no dey detected
Error: IOError: [Errno 121] Remote I/O error
Solution:
- Check physical connections (make sure say Grove cable full ground)
- Verify sensor dey connected to correct port (analog, digital, I2C, UART)
- Run
i2cdetect -y 1to check if device dey show for I2C bus - Try different Grove cable
- Make sure Grove Base Hat dey properly sit for Raspberry Pi GPIO pins
Hardware Issues
Raspberry Pi
Problem: Raspberry Pi no go boot
Symptoms: No display, no LED light dey blink, or rainbow screen
Solution:
- Check power supply: Use official 5V 3A USB-C power supply for Pi 4
- SD card wahala:
- Reformat SD card and reinstall Raspberry Pi OS
- Try different SD card (use recommended brands)
- Make sure SD card properly insert
- Check HDMI connection: Try both HDMI ports for Pi 4, use di one wey near power
Problem: You no fit SSH go Raspberry Pi
Symptoms: Connection refused or timeout
Solution:
- Enable SSH:
- When you dey flash SD card with Raspberry Pi Imager, configure SSH for advanced options
- Or create empty file wey dem call
ssh(no extension) for boot partition
- Find Pi IP address:
- Check your router connected devices
- Use
ping raspberrypi.local(if mDNS dey work) - Use network scanning tools like
nmapor Angry IP Scanner
- Check network:
- Make sure Pi dey for same network wit your computer
- Try ethernet connection instead of WiFi
- Verify username/password (default: username
pi, passwordraspberry)
Problem: Grove Base Hat no dey recognized
Symptoms: Sensors no dey work, I2C errors
Solution:
- Make sure Base Hat properly sit on all GPIO pins
- Check for bent pins on Pi or Base Hat
- Enable I2C interface:
sudo raspi-config nonint do_i2c 0 sudo reboot - Verify I2C dey work:
i2cdetect -y 1
Problem: Raspberry Pi dey slow
Symptoms: Laggy UI, slow response
Solution:
- Check SD card speed (use Class 10 or better, or SSD via USB)
- Free up disk space:
df -hcheck am, delete unnecessary files - Reduce GPU memory inside
raspi-configif you no too dey use camera/display - Close apps wey no need
- Try upgrade to Pi 4 with more RAM if you still dey use Pi 3 or older one
Wio Terminal
Problem: Wio Terminal screen dey blank
Symptoms: No display output after you upload code
Solution:
- Check if code dey initialize di display (TFT_eSPI library)
- Update Wio Terminal firmware from Seeed Wiki
- Add display initialization code:
#include <TFT_eSPI.h> TFT_eSPI tft; tft.begin(); tft.fillScreen(TFT_BLACK); - Try upload example sketch from PlatformIO to test hardware
Problem: WiFi no dey work for Wio Terminal
Symptoms: No fit connect WiFi, network errors
Solution:
- Update WiFi firmware: Follow Wio Terminal WiFi firmware update guide
- Check WiFi credentials: Make sure SSID and password correct
- WiFi band: Wio Terminal only fit use 2.4GHz WiFi (no 5GHz)
- Signal strength: Move closer to router
- Router settings: Some enterprise/WPA-Enterprise networks no dey work
Problem: Wio Terminal no dey recognized by computer
Symptoms: USB device no dey detected
Solution:
- Try different USB cable: Use data cable, no be charge-only cable
- Enter bootloader mode: Slide power switch down two times sharp sharp
- Blue LED go pulse, device go show as "Arduino" for Device Manager
- Install drivers (Windows):
- Download and install Seeed USB driver
- Try different USB port: No use USB hubs, use direct connection
- Update system USB drivers
Problem: Sensors no dey work for Wio Terminal
Symptoms: Grove sensors no dey read data
Solution:
- Check Grove cable connections
- Make sure you dey use correct Grove port (left or right)
- Include correct libraries for sensor
- Check sensor power requirements
- Test sensor with example code from library
Virtual Device (CounterFit)
Problem: CounterFit app no go start
Error: Different Python errors when you start CounterFit
Solution:
- Make sure virtual environment don activate
- Install or reinstall CounterFit:
pip install CounterFit - Check if port 5000 no dey already use:
- Windows:
netstat -ano | findstr :5000 - macOS/Linux:
lsof -i :5000
- Windows:
- Kill process wey dey use port 5000 or use different port:
counterfit --port 5001
Problem: No fit connect to CounterFit from code
Error: Connection refused or timeout
Solution:
- Verify say CounterFit dey run: Open browser go
http://127.0.0.1:5000 - Check connection URL inside code match CounterFit address
- Make sure firewall no dey block connection
- Try restart both CounterFit app and your code
Problem: Sensors no dey show for CounterFit
Symptoms: Created sensors no dey show for CounterFit UI
Solution:
- Create sensors for CounterFit UI before you run code
- Refresh browser page
- Check sensor type match wetin code expect
- Clear browser cache
Connectivity Issues
WiFi Connection
Problem: Device no fit connect to WiFi
Symptoms: Connection timeout, authentication fail
Solution:
- Check SSID and password: Make sure credentials correct
- WiFi band: Most IoT devices only support 2.4GHz (no 5GHz)
- Router settings:
- Disable AP isolation if e enable
- Use WPA2-PSK security (no use WPA3, WEP, or open network)
- Make sure DHCP dey enable
- Hidden networks: If SSID hidden, you fit need explicitly configure am
- Signal strength: Move device closer to router
- Interference: Other devices, microwaves, or walls fit interfere
Problem: WiFi connection dey drop often
Symptoms: Connection dey come and go
Solution:
- Check router stability and consider restart am
- Update device firmware
- Use static IP instead DHCP
- Reduce distance to router or add WiFi extender
- Check interference from other devices
- Make sure power supply steady (especially for Raspberry Pi)
Cloud Services
Problem: No fit connect to Azure IoT Hub
Error: Authentication fail, connection refused
Solution:
- Verify credentials:
- Check say connection string correct
- Make sure no extra spaces or line breaks inside connection string
- Check device registration: Device must register for IoT Hub
- Firewall/proxy: Make sure outbound MQTT (port 8883) or HTTPS (port 443) dey allowed
- IoT Hub region: Make sure IoT Hub dey run and no dey different region wey dey cause latency
- Quota limits: Check if free tier limit don pass
- Test connection:
az iot hub device-identity show-connection-string --hub-name YourIoTHub --device-id YourDevice
Problem: Azure Functions no dey trigger
Symptoms: Messages dey send but function no dey run
Solution:
- Check say Function App dey run (no stop)
- Verify connection string for Function App settings
- Check function logs for Azure Portal
- Make sure Event Hub compatible endpoint configure correct
- Verify message format match function expectations
- Check Function App service plan (consumption or dedicated)
MQTT
Problem: MQTT connection no fit connect
Error: Connection refused, authentication fail
Solution:
- Broker address: Make sure broker URL/IP dey correct
- Port: Check port number (1883 if no encryption, 8883 for TLS)
- Authentication: Make sure username/password dey correct if dem need am
- TLS/SSL: Make sure certificates valid and dem trust am
- Firewall: Check say port no block
- Test with MQTT client: Use MQTT Explorer or mosquitto_pub/sub test am
Problem: MQTT messages no dey reach
Symptoms: Messages publish but subscribers no receive
Solution:
- Topic names: Make sure subscriber topic and publisher topic match well well
- QoS level: Try QoS 1 or 2 no be 0
- Wildcards: Check say topic wildcards dem use correct (
+for one level,#for multiple levels) - Retained messages: Publisher fit set retain flag to keep last message
- Connection timing: Make sure subscriber connect before messages publish
Sensor and Actuator Wahala
Grove Sensors
Problem: Sensor dey give wrong values
Symptoms: Readings na 0, -1, or nonsense values
Solution:
- Check connections: Make sure sensor connect well
- Correct port: Make sure sensor dey correct port type:
- Analog sensors → Analog ports (A0, A2, A4)
- Digital sensors → Digital ports (D5, D16, D18, etc.)
- I2C sensors → I2C ports
- Calibration: Some sensors need calibration (soil moisture, light)
- Power cycle: Unplug and plug sensor back
- Sensor datasheet: Check sensor specs and wetin e need
Problem: Capacitive soil moisture sensor always say wet
Symptoms: Sensor dey read high moisture even if soil dry
Solution:
- Calibration needed: Soil sensors need calibration:
- Read value for air (dry baseline)
- Read value for water (wet baseline)
- Map readings between these values
- Check sensor coating: Moisture sensors fit spoil if coating damage
- Placement: Make sure sensor fully put insi soil
Problem: Temperature/humidity sensor readings no correct
Symptoms: DHT11/DHT22 dey show wrong temperature or humidity
Solution:
- Sensor placement: Avoid direct sunlight, heat, or strong airflow
- Warm-up time: Allow sensor 2 seconds after power on before read
- Read frequency: DHT sensors need time between reads (at least 2 seconds)
- Check for condensation: Fit affect readings
- Sensor quality: DHT11 no too accurate like DHT22
Camera
Problem: Camera no dey detect for Raspberry Pi
Error: mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera'
Solution:
- Enable camera interface:
Go Interface Options → Camera → Enablesudo raspi-config - Check ribbon cable: Make sure camera cable correctly insert
- Blue side face USB ports for Pi Zero
- Blue side face away from USB ports for Pi 4
- Update firmware:
sudo apt update sudo apt full-upgrade sudo reboot - Test camera:
raspistill -o test.jpg
Problem: Camera pictures no clear
Symptoms: Blurry, dark, or washed-out pictures
Solution:
- Focus: Remove protective film from lens, adjust focus if fit adjust
- Lighting: Make sure light enuf
- Camera settings: Adjust exposure, ISO, white balance for code
- Stability: Keep camera steady, use tripod if need
- Resolution: No exceed camera max resolution
Microphone and Speaker
Problem: No sound input/output
Symptoms: Microphone no record, speaker no play sound
Solution:
- Check connections: Make sure audio devices well connect
- Test hardware:
- Speaker:
speaker-test -t wav -c 2 - Microphone:
arecord -lto list,arecord test.wavto record
- Speaker:
- Volume settings: Check and adjust volume:
alsamixer - Select audio device: Specify correct audio device for code
- Driver issues: Update ALSA or reinstall audio drivers
Problem: ReSpeaker hat no dey work
Symptoms: Audio device no detect
Solution:
- Install drivers:
git clone https://github.com/HinTak/seeed-voicecard cd seeed-voicecard sudo ./install.sh sudo reboot - Check installation:
arecord -lsuppose list ReSpeaker - Update firmware: Some Pi OS versions need driver updates
- Check seating: Make sure hat proper connect to GPIO pins
Development Environment Wahala
VS Code
Problem: Terminal no dey activate virtual environment automatically
Symptoms: Terminal open but venv no activate
Solution:
- Set Python interpreter: Command Palette → "Python: Select Interpreter" → Choose venv
- Restart VS Code after selecting interpreter
- Check settings: For
settings.json, add:"python.terminal.activateEnvironment": true
Problem: Code no dey run for device
Symptoms: Code dey run but nothing happen for device
Solution:
- Make sure code save (check dot for file tab)
- Check which Python dey run:
which pythonorwhere python - For Wio Terminal: Make sure code upload via PlatformIO (click upload button)
- For Raspberry Pi: SSH into Pi and run code there
- Check output window for errors
Problem: IntelliSense no dey show library functions
Symptoms: No autocomplete for imported modules
Solution:
- Make sure library dey install for current environment
- Reload VS Code window
- Check Python interpreter dey correct
- Install type stubs if dey:
pip install types-<library-name>
Python Virtual Environments
Problem: No fit create virtual environment
Error: The virtual environment was not created successfully
Solution:
- Install venv module:
- Ubuntu/Debian:
sudo apt install python3-venv - macOS: E suppose dey inside Python
- Windows: Reinstall Python with all components
- Ubuntu/Debian:
- Check Python installation: Make sure Python well install
- Use full path: Try
python3 -m venv .venvwith explicit python3 command
Problem: Packages install for wrong place
Symptoms: Import error after package install
Solution:
- Make sure venv activate: Command prompt go show
(.venv) - Check pip location:
which pipsuppose point to.venv/bin/pip - Reinstall for venv: Activate venv, then
pip install <package> - No use sudo with pip inside virtual environment
Problem: Virtual environment no portable
Symptoms: Venv no dey work after move or for different computer
Solution:
- No move venvs: Delete and recreate for new location
- Use requirements.txt:
pip freeze > requirements.txt pip install -r requirements.txt - Recreate venv:
python3 -m venv .venv source .venv/bin/activate # or run activate.bat for Windows pip install -r requirements.txt
Dependencies
Problem: Package installation fail
Error: Different pip errors during installation
Solution:
- Update pip:
pip install --upgrade pip - Install build tools:
- Ubuntu/Debian:
sudo apt install build-essential python3-dev - macOS:
xcode-select --install - Windows: Install Visual Studio Build Tools
- Ubuntu/Debian:
- Check internet connection
- Try different package index:
pip install --index-url https://pypi.org/simple/ <package> - Install specific version:
pip install <package>==<version>
Problem: Dependency conflicts
Error: ERROR: pip's dependency resolver does not currently take into account all the packages that are installed
Solution:
- Use fresh virtual environment for every project
- Update packages:
pip install --upgrade <package> - Check requirements: Use
pip checkto find conflicts - Install compatible versions: Specify version ranges for requirements.txt
Performance Wahala
Problem: Code dey run slow
Symptoms: Delays, timeouts, e no dey respond well
Solution:
- Reduce sensor read frequency: No read sensors too many times
- Optimize loops: No busy-wait, use sleep() or delay
- Memory wahala:
- Close apps wey no need
- Free storage space
- Monitor with
toporhtopfor Pi
- SD card speed: Use faster SD card or SSD for Raspberry Pi
- Network delays: Use async operations for network calls
Problem: Out of memory errors
Error: MemoryError or system freeze
Solution:
- For Raspberry Pi:
- Close unneeded apps
- Increase swap space
- Use lighter OS (Lite version)
- Upgrade RAM (Pi 4 get 2/4/8GB options)
- For Wio Terminal:
- Reduce buffer sizes
- Use smaller images
- Optimize string usage
- Check for memory leaks (unreleased memory)
Problem: Data loss or corruption
Symptoms: Messages missing, files corrupted
Solution:
- SD card wahala:
- Use quality SD cards (no cheap or fake ones)
- Backup regularly
- Clean shutdown (no unplug directly)
- Buffer overflow: Increase buffer sizes for code
- Network reliability: Use retry logic and error handling
- Quality of Service: Use MQTT QoS 1 or 2 for important messages
Common Error Messages
ModuleNotFoundError: No module named 'X'
Cause: Package no install or virtual environment no activate
Solution:
pip install X
Make sure virtual environment don activate first.
Permission denied on Linux/macOS
Cause: Need elevated permissions or file permission problem
Solution:
- For system commands: Use
sudo - For pip: NO use sudo with venv, activate venv first
- For serial port: Add user to dialout group:
sudo usermod -a -G dialout $USER, then logout/login
OSError: [Errno 98] Address already in use
Cause: Port don already dey use by another process
Solution:
- Find process wey dey use port:
lsof -i :<port>ornetstat -ano | findstr :<port> - Kill process or use different port inside your code
SSL: CERTIFICATE_VERIFY_FAILED
Cause: SSL certificate validation fail
Solution:
- Update certificates:
pip install --upgrade certifi - Check system time correct:
date - For development only (no production): Disable verification for code
IndentationError: unexpected indent
Cause: Python indentation wahala (mix tabs and spaces)
Solution:
- Use consistent indentation (4 spaces na Python standard)
- Configure editor to use spaces not tabs
- VS Code: Set
"editor.insertSpaces": trueand"editor.tabSize": 4
UnicodeDecodeError or UnicodeEncodeError
Cause: Character encoding wahala
Solution:
# Wen you dey read files
with open('file.txt', 'r', encoding='utf-8') as f:
content = f.read()
# Wen you dey write files
with open('file.txt', 'w', encoding='utf-8') as f:
f.write(content)
How to Get Help
If you don try all these troubleshooting steps and you still get wahala:
1. Check Existing Resources
- Documentation: Read README and lesson instructions
- Hardware guides: Check hardware.md for hardware info
- Seeed Studio Wiki: Seeed Studio Wiki for Grove parts
2. Search for Similar Issues
- GitHub Issues: Search existing issues
- Stack Overflow: Search error messages
- Device forums: Check Raspberry Pi or Arduino forums
3. Create a GitHub Issue
If you no fit find solution:
- Go GitHub Issues
- Click "New Issue"
- Give:
- Clear description of problem
- Steps to reproduce
- Error messages (full text)
- Hardware/software versions
- Wetin you don try before
- Screenshots if e fit help
4. Join the Community
- Discord: Microsoft Foundry Discord
- Microsoft Learn: Microsoft Learn IoT
5. Provide Good Bug Reports
Good bug report gots to get:
- Environment: OS, Python version, hardware wey dem use
- Steps to reproduce: Exact steps wey dey cause the mata
- Expected behavior: Wetin suppose happen
- Actual behavior: Wetin really dey happen
- Error messages: Complete error text, no screenshots
- Code: Small code example wey fit produce the matter
Tips for Prevention
General Best Practices
- Keep backups: Regular backup of working SD cards/code
- Document changes: Write down wetin dey work inside comments
- Version control: Use git to track code changes
- Test incrementally: Test small small changes before you join dem together
- Read error messages: Dem dey usually yan you exactly wetin wrong
- Update regularly: Keep software/firmware up to date
- Use quality components: No use cheap cables/power supplies
- Stable power: Use correct power supply (especially Pi)
Development Workflow
- Start simple: Begin with example code wey dey work
- One change at a time: E go easier to find wetin break
- Test frequently: Catch problems early
- Keep it clean: Arrange files and code well well
- Comment code: Future you go appreciate am
Dis troubleshooting guide na community dey maintain am. If you find solution to problem wey no dey here, abeg consider contributing to help others!
Disclaimer: Dis dokiment na di one wey AI translation service Co-op Translator translate. Even though we try make e correct, abeg sabi say automated translation fit get some mistakes or gbege. Di original dokiment wey e dey for im own language na di correct one wey you suppose trust. If na serious mata, na professional human translation you suppose use. We no go carry any blame if people no understand well or dem knack wrong meaning from dis translation.