You won’t be using the
ANALOG IN
connections on the Enviro pHAT so the included 10-pin breakaway header can be set aside for another project.
picon
via SSH and install pip and paho-mqtt
sudo apt update
sudo apt install python3-pip
sudo pip3 install paho-mqtt
curl https://get.pimoroni.com/envirophat | bash
y
to continue
n
when prompted for a full install
mkdir rwis-sim
cd rwis-sim
wget -O rwis-sim-latest.zip -L 'https://cisco.box.com/shared/static/immapg34lg73abr4m325jcr15l7za598.zip'
unzip rwis-sim-latest.zip
rm rwis-sim-latest.zip
You shouldn't need to, but you can edit any settings that might need changing in the rwis-sim.ini
file:
roadway1-rwis1
)
sudo cp rwis-sim.service /lib/systemd/system/
sudo systemctl enable rwis-sim
cd
mkdir car-sim
cd car-sim
wget -O car-sim-latest.zip -L 'https://cisco.box.com/shared/static/5z4vf02i7ft411088ml9k0ooj75rmene.zip'
unzip car-sim-latest.zip
rm car-sim-latest.zip
You shouldn't need to, but you can edit any settings that might need changing in the car-sim.ini
file:
roadway1-rsu1
)
sudo cp car-sim.service /lib/systemd/system/
sudo systemctl enable car-sim
sudo poweroff
Connect power to the system using one of the following options:
The USB battery pack will automatically switch over to battery power when upstream power is disconnected so it can be left connected and powering the setup until it needs to become mobile.
When the RWIS is connected to the MQTT broker it will flash the top LEDs every 3 seconds when it takes its sensor readings. However, if you are following the DOT EFM Demo Kit documentation in the recommended progression you won’t have set up the MQTT broker yet on the IR829 EFM instance. Both the RWIS and car simulator will automatically connect to the MQTT broker once it is set up so you don’t need to do anything extra like rebooting the system to get them to connect.
If you are coming back to this section because you have the MQTT broker set up now, you can SSH into the Pi Zero W as picon
and cat ~/rwis-sim/rwis-sim.log
or cat ~/car-sim/car-sim.log
to see if the logs indicate any issue. MQTT connectivity issues are usually due to IP misconfiguration or not having configured the MQTT broker on the IR829 EFM correctly. The log file should be informative about the reason for not being able to connect. Double-check you accurately followed every step of the IR829 EFM configuration process as well as the setup procedure above.
Good luck and don’t be afraid to ask for help if you get stuck!
On to Chapter 5 Serial DMS