Reader small image

You're reading from  Practical Python Programming for IoT

Product typeBook
Published inNov 2020
Reading LevelIntermediate
PublisherPackt
ISBN-139781838982461
Edition1st Edition
Languages
Right arrow

Configuring the Tree MQTT service

The Tree MQTT service configuration is found in the chapter14/tree_mqtt_service/config.py file. Similar to the Tree API service, they mostly relate to the configuration of the APA102 and the servo. You will also find this file and its configuration options well commented.

The default configuration will be adequate for running an example locally on your Raspberry Pi; however, just as we did for the Tree API service configuration, please check and update the APA102_NUM_LEDS = 60 parameter as appropriate.

If you also needed to change any of the APA102_DEFAULT_CONTRAST, SERVO_SWEEP_COUNT, or SERVO_SWEEP_DEGREES parameters while running the Tree API example, please also update these values now for the MQTT example.

Once you have made any necessary changes to the configuration, we will proceed and run our Tree MQTT service program and publish MQTT messages to make our IoTree work.

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Practical Python Programming for IoT
Published in: Nov 2020Publisher: PacktISBN-13: 9781838982461