t
o
n
y
a
n
g
'
s
 
w
e
b
l
o
g


i've got a long list of overdue projects. one of them is creating a wireless water sensor with an ESP8266 microboard using the arduino IDE to program it. the one that i have is the nodeMCU amica. i already had the arduino IDE installed on my mac (v1.8.5) then followed these steps to install the ESP8266 package. first i wasn't sure which nodeMCU i had. apparently there are at least 3 different versions of nodeMCU. what's more confusing is the first version is called both v0.9 and V1, while the second version is known as v1.0 and V2. but because i have the black circuit board, i have a 2nd generation v1.0. i copied the flashing LED test code then tried to upload the compiled script when it gave me an error. apparently my arduino IDE wasn't seeing the nodeMCU. i fixed that by installing a USB to serial driver from silicon labs (v5). once i did that, i saw a new /dev/cu.SLAB_USBtoUART port option when i reconnected the nodeMCU. i tried uploading again and after a brief wait, it finished compiling and successfully uploaded the script. i could it tell was working because the red led attached directly to the nodeMCU header was flashing.

when i went to compile the water sensor sketch, it gave me an error, said PubSubClient.h was missing. i checked the UbidotsESPMQTT.h and saw sure enough it was making reference to a missing PubSubClient.h. i browsed through the arduino IDE library manager and found a PubSubClient library for messaging MQTT. i installed it and this time the sketch compiled without any problems. i then uploaded the sketch into the nodeMCU. as soon as it finished, it was flashing it's onboard blue LED, meaning the upload was successful.

i attached the water sensor (which glowed red) and ran the nodeMCU from a portable battery charger. unfortunately that doesn't work because once it senses there's no battery, it cuts off the power. so i had to run the nodeMCU from a USB plug. fortunately there's an onboard 3.3V regulator, so the 5V USB power wasn't a problem. i checked out the data on the ubidots dashboard. the water sensor seems pretty sensitive. i set it up so it'd send me a text whenever it detected water. ubidots is a paid service, but gives you 5000 free credits to start with. each device costs 500 credits/month, while each dashboard is 100 credits/month. SMS text costs 20 credits, while triggers (emails/webhooks) cost just 1 credit. i may look into setting up my own MQTT broker/server using a raspberry pi so i don't have to pay ubidots once my credits run out ($5/1000 credits).

with the autumn community garden plot inspection this weekend, i finally paid a visit to the garden via bicycle, navigating around the road construction on oxford that's limited access on the street for weeks now. today was one of the hottest day this year, and definitely one of the hottest days for the month of september, with temperature projected to hit 100°F in certain parts of greater boston, though it was only in the lower 90's according to my weather monitoring station.

my last visit to the garden was 10 days ago. as i said last time, i've basically given up on my garden, as all my tomato plants are diseased, and the rest of my vegetable plants have been overgrown by perennials. there weren't a lot of weeds (i do some weeding every visit, no matter how infrequent), just some grabgrass growing along the edges and on the path that i uprooted. i also uprooted all the tomatoes, and noticed late season blight affecting most other gardeners as well. afterwards i watered the garden. i wasn't expecting to harvest anything but did find a rather large (size of a forearm) zucchini that'd been slowly growing, hidden away from hungry critters and disease. by the time i left, i was sweat-soaked in the sweltering heat.

i biked to the cafe to ask my father if he was able to remove the burners from our old charbroil barbecue. he said he managed to removed all the screws, but he can't take out the burners because they have to be removed individually, and currently they're tied together by the corroded carryover tubes, with screws so heat damaged they can only be removed destructively through sheer force. i also asked if i should get the smller size replacement national cycle windshield, showing my father the comparison video of acrylic versus polycarbonate windshields.

i returned home to a leftover cruise ship muffin for lunch followed by a slice of egg custard pie. even though it was hot outside, i felt pretty comfortable inside, only turning on the AC briefly in the evening. my korean red garlic arrived in the mail. if you didn't tell me, i wouldn't have known they were anything special. yes, some of the bulbs have a reddish tinge on the skin, otherwise they look just like regular garlic. somehow i was expecting them to be bigger. i have so many bulbs, i'm tempted to try a few cloves to see if they taste any different from regular garlic.

in the late afternoon the sky darkened and it rained a bit, though nothing torrential, and briefly at that. i watched as a girl duck under a tree to avoid getting drenched. feeling sorry for her, i was about to go out and let her borrow one of my umbrellas when she suddenly disappeared, must've called for an uber pickup.

i had another bowl of rice noodles for dinner while watching the falcons-eagles game, which was delayed due to thunderstorms. besides a late start, the game was also boring, with not a single touchdown in the entire first half. naturally i was rooting for atlanta, and they looked like they might win it, but in the final minutes philadelphia managed to score to win the game.

i ended up ordering the national cycle heavy duty low boy replacement windshield screen ($114.95). i also got a few more items from ebay: 3x ESP8266 boards ($3 each), 50 pieces of 5mm RGB common cathode LED ($1.83), and a BME280 temperature/humidity/pressure sensor module ($3.69). it'll take these electronic components a few weeks to arrive from china.