A Path Blocked

Ok, last path metaphor, I promise.

Plus, while it was extremely maddening while it was happening, it was actually resolved pretty quickly and could have been resolved three different ways. Really, other than its temporary effect, I probably shouldn’t say anything.

Before all that happened, I had been slowly resolving little issues bit by bit.

I have assembled what might be V1.0 of the Activator hardware board. The Trigger hardware board will probably be very similar, if not identical. Really, identical board with different software could be ideal.

I say might because I find that I do not care for these particular green terminal strips. When I ordered them, I was expecting larger units. There is not a good sense of scale here, but these are eyeglasses sized screws. Actually, you can see that the screws are about the same size as the solder pads on the circuit board, which are about 0.075″ in diameter. I have already cross threaded one by opening it too far.

Otherwise, from left the right, the first terminal strip is for the battery negative and positive and the external power switch. The next strip is for the plunger reset warning light and the plunger sensor switch. The three pin header is for the servo that trips the plunger.

Above the connectors, left to right are the 5 volt regulator to run the controller, the 12 volt regulator to run the warning light and possible future things and a dual H-bridge board that currently drives just the warning light.

Finally, above that is the star of the show, a clone of the unbiquitous Wemos D1 Mini Pro, so called Pro because it has an external antenna connector, which will be handy since this board will be inside a steel box.

I had two power mishaps with this board. Really, it was one power mishap that caused two problems.

When I was researching what equipment to shoehorn into this system to implement wireless, I had some realizations that could be visualized like rungs on a ladder. First, I knew that my controller board was necessarily going to have to take up some space and my Activator device is pretty crowded inside already.

One step up on the ladder.

The industrial relay that protects the lock motor, while a very robust device, is at it’s heart a very simple device that takes to continuous power from outside and limits it to a short half second or so pulse to the lock motor. I will be providing that lock motor power locally now, through my controller board, which is smart and can do the time limit function. The industrial relay is also pretty big, so removing it might be enough for both my controller and the battery.

Next step up on the ladder.

The lock motor runs on 12 volts. I did some measurments and found that during it’s brief moment of activation, it pulls about 4 amps. If I limit it to less than about 3 amps, it doesn’t pull hard enough to reliably trip the plunger. That is not a terrible amount of current, but as I look around for commerical off the shelf 12V 4A lithium batteries with easy connections and easy charging solutions, they all tend to be kinda big. Way bigger than the space vacated by the timer relay, leaving no space for the controller board. Batteries of other chemistries are even bigger and don’t work as well, so I didn’t even look.

DC to DC boost converters are thing these days. Actually, I have had a really successful history with multivoltage DC to DC converters back in my robotics days. Unfortunately, those blogs were lost ages ago. Anyway, I shop for converters and in a field absolutely flooded with converters for 12 volts INPUT, the few that I could find with 12V output tended to be physically large multivoltage output units for 48V+ input or if they are boost converters that work at smaller inputs, they are never more than 1A out. There are a few exceptions in the $50 range and I really want to avoid those if I can.

I did play with the *voltage* on the car lock and found that, so long as it had plenty of current available, it would reliably work all the way down to just under 6 volts. 7.4 volt LiPO batteries are common and RC car batteries have commonly available connectors and chargers. I found some reasonably high Ah rated batteries and a nice charger that wasn’t stupid expensive and got them on the way, along with some appropriate connectors.

Next step up on the ladder.

Next, I knew I needed to power the controller. I have a couple of options. I can power it from the USB jack with a converter connected to the battery, but it seems more elegant and controllable to supply 5 volts to it externally. I have batteries coming and I did find some nice 5V 1A DC-DC converters in my earlier shopping, so I found them again and ordered a handful. They came in a package of 10, very inexpensive.

Next step up on the ladder.

Big epiphany, with the controller board, I can directly operate a servo! This eliminates the need to ‘protect’ the lock motor and a servo is significantly smaller than the lock motor. I can power it directly from the board or even directly from the battery if the 5V 1A supply is not enough. That will also ensure I have more room for my RC car battery.

Next step up on the ladder.

I had tested the nice big warning light that I want to put on the Activator to remind people to reset it. At the time I chose this one, everything was running on 12 volts, so it made sense to get 12 volt lights. I got a variety of colors. I particularly expect to use red for the Activator light and red, yellow and green on the Control Box. Experimentally, I connected a red light to 7.4 volts from my bench power supply. It lights up, but not very brightly. It will almost certainly be hard to see outside even at full brightness. I need 12 volts for at least the light. Luckily, the same DC-DC converters I ordered above are actually adjustable for 5, 8, 9 or 12 volts output, so other than having to add it to the board, problem solved.

Next step up on the ladder.

This week, I had some time to tinker and got the board built and populated. I don’t think I connected power to it before verifying the power, but more on that in a minute. With the controller board out, I connected one of my batteries and found that the 5V board was outputting 7.9 volts. The 12V board was good, but 7.9V is not 5V.

The default tiny zero ohm resistor jumper settings on the boards is for 12V, so for the 5 volt board, I just removed both of them. I looked carefully to ensure there was not a solder bridge. I alternately shorted them to ensure they they indeed changed the voltage. Only with both shorted did they provide the proper 12V output. All three other settings were higher than they were supposed to be.

While I was looking up this chart to verify that I did indeed have the jumpers correct, I noticed the error of my ways. This little board is designed for 3.7 volt input.

At some point I briefly looked at 3.7 volt batteries and I’m sure these converter boards ended up in my search history at that point. Later when I just wanted converter boards, I remembered them but I was too high up the ladder to see the the voltage 🙂

As luck would have it, 3.7 volts works fine for me, other than the expense of having purchased some 7.4 volt batteries that I don’t technically need, at least not for this part of the project. My charger will work for them, too.

However, I might choose better DC-DC boards.

I mentioned that these are inexpensive boards. $10 for a 10 pack. The voltage selection chart silkscreen on the actual board is completely illegible. All four setting for A & B look identically blotchy. And for what it’s worth, the output power pins are spaced 0.4″ apart, but the input power pins look at a glance like they are 0.2″ apart, but they are not. They fall somewhere between 0.2 and 0.3″. The output seems to be good for about 6 watts. The specs are somewhat iffy, but hints that higher voltages are probably at less than the 1A specified for 5V. The examples they give all work out to slightly more than 5 watts. This is fine for my needs. I don’t expect to need more than 150mA for 12V.

Until I put Activator board together, I’d been running this controller on either a laptop USB or a USB power pack. Now that I had it put on the board and running on my bench supply standing in for the 3.7 volt batteries that were enroute, it was nice to leave it on the kitchen table where it was close enough to hear the servo cycle, but but off my desk which was cluttered enough with the Trigger and ControlBox modules so that I could hit the buttons on them and observe the display on the ControlBox. For some reason, I had to interact with the Activator. I don’t remember why. While I was near it, I smelled that classic ‘something is hot’ smell. Since I had thrown over voltages at it earler, I finger probed and discovered that the inductor on the 5V board was pretty hot to the touch. I immediately shut off the power supply. I pulled to control board off, turned on the power supply and noted that the voltage was indeed 5 volts, so that’s good.

I presumed that the little 1A supply was having trouble keeping the controller and the servo both supplied, so I rewired the servo to run directly off the battery. That is a little below spec for it; it is rated for 4.8 to 8.4 volts, but in testing, it worked fine and still pulls plenty strong. I do not expect it to be a limitation for the Activator sear. Of course for the testing, the controller was plugged back in and in just a little bit, I smelled ‘hot’ again. I probed the power boards again and while it was not as hot, the 5 volt board was definitely getting warm. I probed around on the controller and ZOWIE a chip on the board was hot enough to immediately cause pain. I removed power again and pulled the board out. It turns out to be the USB serial chip. Once it cooled off, I plugged it into a USB cable on my laptop and it got seriously hot in a couple of seconds, so it definitely has a problem.

As mentioned earlier, I don’t think I connected the 7.4 volt battery to the system with the controller in place, thus applying basically 8 volts to its 5 volt input, but I can’t authoritatively say never. Plus, after working for weeks under various conditions, it acted up the day it was running on the new carrier board. The CPU seemed to be working, by the way. The USB chip was smokin’ hot, but even before I discovered it was baking, the device was responding to ESP-NOW messages and operating the servo. I’m just not sure it would have lasted much longer.

Happily, I have one not in current use, so I could swap it out. It is a slight pain to update the MAC addresses in the software to use the new device, but at least this one doesn’t sterilize the air around it. As these are my favorite boards for this application, small cheap boards with the external antenna connector and not a lot of unecessary IO, I may need to order a few more of them. I do have some 40 pin ESP32s with external antenna connectors, so I’m not without a way forward if needed.

In other hardware news, I have been using a slick device with a built in screen for the ControlBox unit. I don’t know if this will be the final controller for the ControlBox, but it has it’s advantages.

It is an M5Stack Core. I originally got this for ESPHome use and HomeAssistant, only to find that it was not yet supported there. I have not rechecked lately. Anyway, it is an ESP32 in a nice case with a few built in goodies, most importantly for this, a 320×240 TFT display and three front mounted buttons. It also has a speaker, a TFCard slot and, while I’m not sure how long it can run on this, it has a 110mAh battery built in. I am thinking about building a little program to send a message to another module once a minute, with the other module logging the time and see how long it lives.

For use as a real ControlBox controller, it has one drawback. There is not a really strong way to secure external connections to it. It has a row of exposed pins on one side and exposed pin jacks on three sides. The pins are not ideal ones for reuse for my purposes and the pin jacks would be even more difficult to really secure the connectors to for a device that might get tripped over or dropped and has to travel on gravel roads in someone’s trunk or pickup bed. In the long run, I may need to use some descreet components for these setup.

But for now, it seems a good way to start, with a caveat.

This was before I had it doing anything with text fields. I was sending stuff I would normally dump to Serial0 to the TFT instead.

I have found that, like many of these small hardware displays, or at least the libraries written for them, you often can’t just throw text at it and have it behave the way you would like it to, like scroll like a classic screen. On the screen as shown above, I can send one more line to it, then any subsequent lines will just continue to clobber that bottom line, text written on top of existing text.

Visuino supports text fields. The field is located anywhere on the screen by x-y pixel coordinates then prints text you provide with the font, size and color attributes your provide. But so far as I can find, there is no clear command. Subsequent text clobbers what’s already there. Argh.

I had been working on this issue reiteratively in what spare time I have for a few days now. I have a nice title bar and I intend to determine and display the status of the two (currently) available remote devices and provide a 3-4 line messages window of scrolling messages about whats going on, trigger received, trigger sent, test sent, device needs reset, etc. I have a label over one of buttons at the bottom of the screen and if you push that button, it sends a test trigger to the activator. All of these things work, until you put enough text somewhere to clobber what’s already there.

The only way I have found to clear the screen is to literally clear the entire screen, write it black, then rewrite all this stuff back to it. That seems completely ridiculous and it puts it on me to maintain a screen map somewhere. That’s not what I want to do. I want to make my hardware do stuff and print stuff on the screen to tell my users what my hardware is doing for them. The IDE should know how to make the *display* do stuff.

Sparse documentation is a recurring theme here. For example, these are two very similarly named components:

If you get context sensitive help for Delay, you get a Wiki page with thin but not entirely useless descriptions of the settings for the component and what the Start, Out and Reset pins do, as well as links to some example projects that happen use it.

Maybe Delay doesn’t do exactly what you are looking for. Logically, it seems like Timeout might do a similar kind of thing but attempt to get context sensitive help for Timeout and you just get:

It offers that you can search for it in other places, but so far, that has universally not helped on anything I have searched for. I suppose it could happen. Maybe I haven’t looked for the right thing yet.

Which brings me indirectly to my brief but severe irritation last night.

Regardless of this irritation with the documentation, I like the product. I was able to reach a working point with my devices very quickly. As always seems to be the case, a lot more time goes into the user interface than to the actual device (especially if you can’t figure out how it works). Anyway, I had been running on a 15 day trial version of Visuino Pro and there were two days left. I saw no reason to not proceed with the purchase. I looked at the version matrix and while I had been running the Pro on trial, I didn’t see anything in the Pro column that I was actually using, so I elected for the Standard version with a 1 year subscription for updates. The purchase, install and registration went through without a hitch. It automatically opened after installation and I pulled up the ControlBox project and played with it a bit. After a little while, I needed to open a second instance to make a companion change to the Trigger project. When did that, I noticed/remembered that I still had Visuino Pro installed and, fatally, decided to pull up control panel and remove it.

Long story short, had I removed Pro before installing the Standard version or reinstalled Standard after removing Pro, things would have been ok, but the removal of Pro removed all the components from the Visuino library folders. There was some minimal number of components that I guess are built in to the binaries and support for only the Arduino Uno R3, but my projects now spawned a huge list of errors, most of which were missing components and many of those were specific to my missing board. Once I had seethed down to being able to write without being overly abusive, I dashed off a note to Visuino support. I don’t remember exactly the details, but in short I wondered why the uninstall script would remove user files like all my components.

Interestingly, all of this was loaded on my work laptop, which heavily uses Microsoft OneDrive. Not long after my note to support was sent, OneDrive serendipitously popped up a dialog asking if I wanted to permanently delete the several thousand files I had deleted recently. I dove into that dialog and found that I could restore the folders that the Visuino uninstall script had deleted. I ran Visuino and everything was happy as it could be. I was was exhausted and shut everything down and went to bed!

By morning, I had a reply from Visuino support, patiently telling me that a reinstall would most likely fix it and that my own projects were safely stored elsewhere. I am certain that is true and I will probably do that because in restoring those folders, I am sure I now have some Visuino Pro components that I have technically not paid for. Then again, the program and/or license may be smart enough to prevent them from working. Shrug. As I noted when I looked through to version matrix, I wasn’t using any Pro components, which consisted mainly of FFTs and other such advanced data processing components. Interesting, but not applicable to anything I am likely to need for yanking on chains by novel means.

Where The Path Leads

I have made what I think is a lot of good progress with both Visuino and the hardware.

The Visuino sketch shown in the last post kind of worked regardless of being very wrong in a couple of places 🙂

I had made a comment on a video about the recent massive expansion of Visuino. I noted how my code basically ran once when the first signal was received after power up, but since that same value gets sent repeatedly, the received message never changes and the code never seems to see subsequent received messages. None other than company founder Boian Mitov replied, asking for my program and details so he could offer suggestions. I excitedly sent a (far too wordy, as is my modus operandi) email and expectantly waited. Of course, I continued working on it and found a (naive) workaround that (kinda) worked, though it would come to light later that it was not actually responding to *the* command, but rather *any* command.

Several days later, the reply came from Mitov, with apologies for the delay, but with a beta update of the software that had several changes, including how the CompareValue component works. Between the guidance provided and my own experimentation in the mean time, I was definitely set upon the proper path and that piece of code was *truly* working!

My current design has three main devices, the Trigger, the Activator and the ControlBox between them. I have three ESP8266 devices, appropriately labeled Trigger, ControlBox and Activator. Trigger looks for a button press and upon detecting it, sends a message indicating that to its ESP-NOW peer, the ControlBox. At this point, ControlBox literally just retransmits the received message to its other peer, the Activator. Activator receives the message, verifies that the message matches the command to act and then cycles a servo, which will trigger the mechanical yanking device.

ControlBox will also have a dry contact input so that Trigger is not necessarily needed in all cases. Eventually, ControlBox will have a display and buttons driving a menu system where various behaviors and parameters can be selected.

At one glorious point, all three ESP8266 boards were scattered across my desk, communicating wirelessly at a range of 10’s of centimeters. It looks more chaotic than it really is.

image.png

The Trigger device is circled in green, the ControlBox in red and the Activator in blue.

As it currently works, pressing the button on the Trigger sends a message (an integer, 199) to the ControlBox. At this point, the control box retransmits the received message unmodified to the Activator. If the received integer at the Activator is 199, it cycles the servo, which will one day soon trigger the spring loaded device.

Future features will include a sense switch in the activator to warn people at the ControlBox that it has not yet been physically reset. Because of the way stages are reset between competitors, some triggering devices can inadvertently trigger a moving target before the stage reset is completed, so being able to arm/disarm the Activator from the ControlBox is a necessary feature. Since all these devices will be run on batteries, a battery status indication at the ControlBox will help ensure that all devices are ready to go. Finally, the ControlBox will be able to sequence multiple Activators. This is a rarely needed feature, but if my device can do this, it will sell 🙂

The fun bits that I have learned along the way:

I need to accomodate either a normally open or normally closed input for the Trigger. The DigitalDemux component makes that pretty simple. The contact goes to the input of the demux. The select switch goes to a DigitalToInteger component to provide a selection for the demux. The outputs of the demux go to EdgeDetector components, one configured for rising edge and one configured for falling edge. The same logic will be duplicated for the electrical input of the ControlBox.

image.png

When I first implemented the ControlBox, I over complicated it. Out of hardware hacking habit, I tried to use the minimum number of bits possible. I had set up the Packet and Unpacket components to use 8 bit integers. This worked, but somewhere in the mix, an integer is a 32 bit value and wrestling with resolving that was becoming troublesome. I had a situation wherein the first byte of the full integer was being interpreted as the command byte and that first byte was *not* 199. Eventually, I realized that ESP-NOW sends a packet with a minimum of 36 bytes and whether I send a payload of 1 byte or 4 bytes makes about 10% difference in the entire message and dealing with a regular signed integer is simpler than trying to shoehorn my ancient bitbanger ways into the mix. Once I abandoned all the conversion necessary for 8 bit integers and literally connected the received output to the transmitter input, it just worked.

image.png

The Activator has been the problem child and was the original reason I posted the comment on the YouTube video. It needs to react to an ESP-NOW command message, but only the right command. Other commands might include a status request, a command to turn a light on or off or a command that sets an operational parameter. I can’t just assume any message is a command to activate. This is why I was struggling so with the the old CompareValue component. However, the new version works better and other advice from Mitov cleaned up everything else. The chain is very simple and straight forward now. The received message is tested to see if it is the activate command. If so, the EdgeDetect component converts that to a clock pulse, which activates the sequencer to cycle the servo.

image.png

I learned that the sequence works slightly differently than expected. The Analog Value is set immediately, then the sequence time elapses. I first presumed that this timer was started and ran, then at the *end* of the sequence, the AnalogValue would be asserted. Now that I realize the proper order, then of course that makes more sense than what I was thinking. However, before I figured that out, there was a noticeable delay between when the button was pressed and when the servo moved. With copious serial prints I was able to verify that the delay was not in the transmission or reception of the ESP-NOW message; that is essentially instantaneous. The delay came from my misinterpretation of the Sequence component. Originally, I was setting the servo to 0 for 10mS, then for 500mS setting it to 90 degrees, the setting it back to 0 for 500mS. The intent was to first ensure that the servo was in it’s home position, then move to 90 degrees, with the first 500mS to ensure it had time to move, then move back to 0 degrees, again with a 500mS time to ensure this had time to happen.

Wellllll…  turns out we don’t need most of that. The Servo component includes an initial value, which apparently homes the servo automatically at startup and then the timing of the sequences was not where I thought they were. The AnalogValue for moving the servo is asserted immediately, then 500mS later, the return to zero value is asserted. This is much simpler than I first presumed and makes for MUCH more elegant process.

If I were to make any complaint about Visuino, it would be that we need some kind of programming guide to demystify the inner workings of these components. The examples in the plethora of available videos often show what to do to make a light blink or whatever, but rarely describes *why* a certain feature is used. For example, a demo on operating a servo had a DivideByValue between the selected AnalogValue and the Servo. Only after extensive experimenting did I figure out that this provides the appropriate fraction needed to scale the degree value requested to the range of PWM that the particular servo will respond to. In the absence of more precise guidance, one could easily assume that the Servo component scaled these degrees itself and would accept a degree value as input. Quite accidentally, “0” and “90” as direct inputs to my servo appeared to work properly, but it turned out to be not 90 degrees, but the full 270 degree range, viewed I would say “backwards”. 0 went to zero, but “90” was so far beyond the 0 to 1 range that it simply went to 270 degrees. As it is a digital servo capable of 360 degree rotation, it took the shortest path counter-clockwise to the requested position, as opposed to the long way, 270 degrees clockwise. Some documentation revealing that the servo requires a 0-1 range instead of a direct degree heading might have revealed this issue much earlier in the process.

As for the hardware, I began laying out prototype circuit boards for the system, starting with the Activator. This is how it turned out before I started wiring it up.

At the top is the ESP8266 board. In the middle are two boost regulator boards (more on that in a minute), a cheap motor driver board that will actually be used to drive the warning light, with room to drive a motor in the future. Along the bottom are connections for the battery, external power switch, sense switch for the punger and the light and finally, the header for servo to trip the sear.

With the power supply boards, I got a little too clever for my own good. They were spec’d out when I was contemplating 3.7V batteries. I don’t recall why I landed on 3.7 to start with, but I did. These boards take a 3.7V input and boost it to 5, 8, 9 or 12 volts, configurable by removing the jumpers A or B or both.

Somewhere in there, I decided to order 7.4V batteries instead of 3.7V. Luckily, I decided to test the voltages before firing up the board because running with 7.4V batteries, the he lowest available voltage is about 8 volts. I have 3.7V batteries enroute.

In other hardware news, I acquired a rather nice carbide metal cutoff saw. This thing makes amazing essentially mirror smooth cuts!

This 2×4 14ga tubing was cut in 10-15 seconds and looks like this!

This will definitely up the fabrication game.

The Path Less Taken

One can find plenty of derision online concerning the Arduino IDE. Shrug. Maybe I am not sophisticated enough to care that much about the occasional issue. I do have two main gripes about it. Once you start a compile, there does not appear to be a way to abort it. This comes up often for me because I will make some change that needs to be compiled and uploaded to test, then while the compiler is still building, I will see some other error that I need to correct. The best I can so is unplug the board so that at least the upload will fail. That brings up the other issue, although this may not be specifically an Arduino IDE issue so much as a general hardware issue. All of these devices that I am working with connect to the PC via USB. Sometimes, all the unplugging, replugging, pressing the reset button on the boards, etc, will cause the USB subsystem to kinda get lost. I don’t know if it’s the IDE, the UART chip drivers on the boards or what. Related to that, those UART chip drivers don’t always get along with USB 3.0. Since I do 99% of this work on a laptop that has two available USB jack, I use a USB hub that happens to have two USB 2.0 jacks and one USB 3.0. My current project requires me to develope on three interconnected devices at the same time and one of the available jacks on my laptop is occupied with my USB headset, it can be pretty easy to forget and plug something into the USB 3.0 jack on the hub. I realized this is a problem once the cards kind of stop responding. Thus far, it takes a reboot to restore trustworthy function.

So, besides all that, I find the Arduino IDE itself is just fine, at least until you have to communicate with something more complex, like a TFT display. The data being fed to the working display is generally not the issue; it’s getting the thing working in the first place. A problem that I had early on, though I have largely solved it by now, is that ESP-NOW is implemented a little differently in the supplied libraries for the ESP32 and the ESP8266. My intent was/is to put tiny ESP8266 boards in the remote devices and a more capable device equiped with a screen and some buttons driving a menu system as the controller. The example code provided for the ESP32 family is much closer to a good starting point for my project than the examples provided for the ESP8266.

The library names are slightly different, which is itself easy to fix, once you know the right library names to use. Trickier to solve, however, is that a very important data structure is slightly different and at least one constant name is different (ERR_OK vs ESP_OK). Luckily the incredibly helpful Programming Electronics Academy published a video on exactly this subject, using the example code from the ESP32 family and modifying it to run on an ESP8266, although I was not aware of it until I was a couple of days into trying to find and solve the problem myself.

Armed with this info and some time to figure out exactly what I needed to accomplish, I got two devices working and the devices can send and receive data from each other.

Next, the ControlBox device needed to be able to send it’s data only on demand. I replaced the delay loop with a few different implementations of detecting a button press. It’s roll as the ControlBox will require it to accept some kind of switch change to send that Activator the go command. Eventually, it will be able to respond to either a local switch or a remote ESP-NOW device sending the appropriate request.

With the button sorted out, I started the activator conversion. The current analog system, where we just throw voltage at a door lock motor to trip the activator. This fairly elegant and thus far very reliable. However, the lock motor is physically large and even though used only briefly, it is pretty power hungry as well, requiring an also physically large industrial timer relay to protect it. Converting this activation device to a servo will recover the space that will be better utilized by a battery in the new design and the servo will arguably require less power.

Getting a connected servo doing *something* itself fairly easy, but getting it to do precisely what I want it to is much more difficult.

As I never stop putting “ESP NOW” in the YouTube search, I stumbled across another way to do this stuff.

Visuino.

The video that introduced me to Visuino makes no mention of it in the title, but as I watched it, there was this visual IDE being used. It was almost mentioned in passing, but in very nearly 8 or 9 minutes real time, an ESP32 board and an ESP8266 board were set up by dragging virtual components onto the screen, interconnecting them with on-screen wires and a few settings in the components. One has a temperature/humidity sensor and the other a small OLED display. The display on one shows the temperature and humity data from the sensor on the other.

It is pretty easy to argue against using such packages from a strictly code efficiency point of view. Visuino produces code that is essentially impossible for the inexperienced programmer to follow and the code sizes produced would not be unfairly called monstrous. My most complex sketch to date (spoliler: I am using Visuino) is nearly 300K and doesn’t only slightly more than the 3K Arduino IDE code that preceded it. These ESP controllers have megabytes of RAM and FLASH to work with, so it is kind of a non-issue.

All is not perfectly rosey, but with an hour or so of judicious tinkering, I had a working receiver, receiving the data sent by my “old” Arduino code. Getting it to activate the servo based on receiving that data turned out to be tougher to figure out, though largely becase I struggled with the kind of object oriented approach after so much time in procedural methods.

The the knowledge gained by the receiver project, it was much easier to reconfigure the sender into Visuino and then to add a button to the sender.

Just this morning, I succeeded with the quick and dirty version of what will one day be deployed in the field, a Trigger device that will initiate the action, a ControlBox to intervene and/or modify before it sends the command on to the Activator.

The Trigger (green arrow) responds to a switch closure and sends a byte of data to the ControlBox (blue arrow) which resends it to the Activator (red arrow) which does a quick 90 degree cycle of the servo (yellow arrow).

For this quick demo, I am using all ESP8266 boards, specifically the Wemos D1 Mini Pro, which supplied with an external antenna connector. Since at least one of these devices will be inside a closed steel box, the external antenna is likely to be a requirement.

The 8266 boards are perfectly appropriate for the two far ends of the system and probably fine for the ControlBox as well, however I would like to put something with a screen and menu buttons on the ControlBox so that features can be selected in a friendly way. The list of features are still a work in progress list, but includes things such as being able to detect and add new devices and the ability to trigger multiple activators, maybe with a timing sequence between them. There quite a few controllers available that already have a screen and buttons and other features ready to go, taking away some of that development time required to make the interconnections between those peripherals and Visuino makes using those peripherals easier. Maybe.

One problem I face with Visuino is that, while there are a lot a supported devices, I already have several devices that would be appropriate to try, but they are not implicitely supported in Visuino. The Arduino IDE provides a pretty easy way to add support for new boards by providing a list of URLs where the supporting device descriptions can be pretty much transparently downloaded. There is a similar list viewable in Visuino, but thus far, I have not found a way to add to it.