Disclaimer and Social

This page may contain affiliate links. As an Amazon Associate I earn from qualifying purchases.

Wednesday, July 25, 2018

Use JavaScript to Decrement Loops in MakeCode

Just found out you can mix-and-match custom JavaScript code with blocks in Microsoft's MakeCode for Adafruit's Circuit Playground Express board.


At a recent maker meeting, one of the makers was trying to determine how to decrement a for-loop using the block editor inside MakeCode, but they couldn't find a way. The built-in for-loop always starts at zero, always increments by one, and always adds. So it's easy to loop from 0 to 255, but there didn't seem to be any way to count backwards from 255 back to 0.

There might be a way to use blocks to decrement a loop, but we went exploring inside the JavaScript editor instead.

Turns out, you can overwrite the blocks by editing the JavaScript code and using the traditional methods for counting down (set start at 255, change the test condition and use "--" instead of "++"). But we weren't sure how the custom code would behave - or if it would even appear in the blocks editor.

The customized code works perfectly fine, and it appears as a gray block with the custom code showing.

Custom JavaScript blocks in Micrsoft MakeCode for Adafruit Circuit Playground Express
The custom JavaScript is shown in the gray block. The code was edited in the JavaScript mode. 


This example shows how to light up the LEDs in sequence from 0 to 10, then turn them off from 10 to 0. It's a simple example, but illustrates how the code appears inside the block editor.



It's great that an old text coder like me can work comfortably in MakeCode using traditional styles, but I need to explore to see if there's an easy way to do decrementing loops in the block editor. I'm fine with text-based coding, more comfortable than with blocks honestly - but I should know more about the block editor in case I ever have to help a new programmer.

If you know how please drop some knowledge in a comment.

Also find me on:
FACEBOOK -or- INSTRUCTABLES -or- YOUTUBE

Monday, July 16, 2018

Color-Wheel for HSB and NeoPixels

Here is a helpful color-wheel for using NeoPixels with the HSB color mode. I had to make a printable version when I switched from the RGB to HSB mode and thought I would share it here. I go into more detail on my Instructable for a visual tone piano.

HSB stands for HUE---SATURATION---BRILLIANCE and is just another way to represent the colors for NeoPixel code. I have used the RGB (red, green, blue) mode for so long the HSB mode threw me for a loop until I drew myself a picture of how it works.

I would have probably never used HSB unless Adafruit's amazing Circuit Playground board started using HSB as its beginner-friendly color mode. Now, Microsoft's MakeCode visual programming platform also offers HSB as an alternative to RGB. So I had to learn it.



HSB vs RGB color wheel space mode for Arduino Circuit Playground NeoPixels
Here's a helpful color-wheel showing how the HSB color space mode works with NeoPixels. The image also shows the basic code used to set the color on Adafruit's wonderful Circuit Playground Arduino board.


I have used RGB, CMYK and even LAB color spaces in Photoshop and Illustrator, but had always avoided HSB for some reason. So I originally felt that HSB didn't give me the precise control I was used to. However, after using it for a while I have come to like it.

Being able to set a basic color with a single number, and modify its intensity with a second (and third) number is a quick and slick method. I might not be able to get the perfect sick-acid-green or a eye-popping-pink-gold with a single color number, but honestly, I don't need to for most of my applications. The 256 mixtures of primary color duos gives me enough choices for most basic applications. And it's certainly simpler for beginners.


HSB neopixel color in Makecode for Circuit Playground
The free MakeCode online programming environment lets you play with HSB color mode. The model (upper left) shows the result of changing the values. It's a great way to try switching from RGB to HSB without even owning a board.

I was so used to mixing color in RGB and CMYK modes that I thought it was simple. Then I watched some new users struggle to make the color they wanted. It was painful just to watch and I remembered how confusing and complicated it really is. Suddenly, the HSB mode made perfect sense to use as the default color mode.

Basically, the HSB model mixes from:
  • pure red, 
  • adds some green to make yellow, 
  • then subtracts red to get pure green,
  • adds some blue to get blue-green,
  • subtracts green to get pure blue,
  • adds red to get purple,
  • and subtracts blue to return to pure red
The result is 256 hues and that's enough for most NeoPixel projects. The MakeCode environment exposes all three elemnts of HSB, so its a great way to quickly learn how to manipulate colors and intensity - you don't even need an Arduino, just used to online model and play with the values in code.


As an Amazon Associate I earn from qualifying purchases.
Shop through our Amazon links to help support this site.

Also find me on:

Thursday, July 12, 2018

Publishing a Gap-Toothed Piano with Circuit Playground

Just got a great reminder of why it's important to publish your work and promote the work of other makers. I've been slacking recently, not publishing or documenting much of anything.

I am cycling away from jewelry-making and back to Arduino type projects. Working with jewelry gives me immediate feedback from real living people through sales and human interaction. I get tiny jolts of ego juice when people buy my stuff, not a lot of sales mind you, but enough to keep me going.

With the Arduino and industrial design stuff however, I had started to feel both overly egotistical (talking about my stuff all the time) and unsure if anyone really cares about the projects anyway. These types of projects can seem tedious to many people (all my friends) and the time-scale is so much longer that few people wait around for the pay-off. Who really wants to hear the details of a five-week project that includes coding, electronics, 3d printing and industrial design?

Then someone did one tiny thing and it helped me - they published something similar to my work.

I love it when I see professional designers come up with solutions that are similar to mine. When people I admire solve the same problem and get the same result, it makes me feel like I did something well.

I'm not designing professionally these days, but it still feels good - like maybe I've still got it - even when the professional's design is much better than mine. That little ego-boost is always pleasant, but it really means something when you're designing in isolation.



A few years ago I made a Musical Doodle Bug for an Instructable. It's a cute toy piano thingy with a gap-toothed face. You can play musical notes and arpeggios while LEDs light up to go along with the music. You can change the speed and octave just by rotating the object. You can change modes with buttons and switches. And I tried to make it kid friendly with a cute case made from common craft supplies. I wanted to make something with my favorite new Arduino board that included fun activities for all ages and skill levels.




Last week, I found a project from Adafruit (one of my favorite maker-centric companies) that used the same board that also played music with a cute, toothy face. Finding that project made me smile. Adafruit's version is much more refined and polished. But the basic approach is the same.

Even better, Adafruit is the maker and designer of the board used in the project. It's their Circuit Playground board, an all-in-one Arduino style board that comes complete with a huge collection of sensors and outputs built right onto the board. I fell in love with this wonderful board as soon as I saw it. It's perfect for new programmers and it's cheap. But it's also powerful enough for advanced designers and programmers to use in "real" projects.


I don't get much feedback on my Arduino projects since I'm the only one locally who really uses Arduinos and such. I enjoyed making the project, but I wasn't sure if it was any good. So when I saw the creators of the board design a project for it - that used just a few of the same elements and approaches that I used - well it made my day, it made me happy, it gave me confirmation. Maybe I was on the right track after all.

This might seem silly and trivial. (It's not the first or only "face piano" after all - no big deal.) If you work in a creative environment and are surrounded by skilled and talented designers all day, then you get constant feedback. You get confirmation and guidance from peers and end-users. Or, if you have a large local maker community you can reach out to them, talk to them in real life or even collaborate on projects.

But if you work in isolation, then it can be weeks or even months between comments from another person (typed and anonymous). It's difficult to know if you are on the right track, or know if any one else is even interested in the same things as you. I've annoyed dozens of local people promoting the joys and wonder of this type of making - to the point that their eyes glazed over. By this point I know I have to depend on the internet to provide feedback from like-minded designers and makers.

Seriously, who in their right mind does flow-charts much less documents them and publishes them. Well I did, and it helped me understand what I was trying to accomplish. If you do too, then just know that you are not alone.


So here's a big shout out and thank you to everyone who publishes their projects - big or small, simple or sophisticated, artistic or practical. You folks help keep me going. And I'm sure I'm not the only one. There are people on remote jobsites, in small communities, or who just have family responsibilities that keep them from being part of a physical IRL community. We tinker and make and keep ourselves halfway motivated with very little outside feedback.

But if one tiny echo of my project can make me this happy and motivate me again, well it makes me want to publish more projects just in case there is one other person who is working on a similar project and needs some support.

BTW, Adafruit does an excellent job of both publishing and promoting other makers' work. Their skill at creating and nurturing a community is amazing. Their attitude is one of the reasons I'm still involved with electronics and Arduinos when everyone around me thinks it's weird and boring. A big shout out to them as well. Go visit their forums and participate.

Just remember - you are not alone. There are other people, normal people without a million subscribers, who tinker and putz in the basement or garage. It's good to hear from them and from you. I learn from you just like the big names. I am impressed by your work and your creativity. Please publish more of your projects. Help keep me motivated and I promise I will publish more in return.


Also find me on:
FACEBOOK -or- INSTRUCTABLES -or- YOUTUBE

Tuesday, July 3, 2018

NeoPixels Behind Air Dry Clay

Tried a new material for diffusing NeoPixels and making jewelry - air dry clay. It didn't work out like I hoped, but the experiments were successful enough that I will continue to play with it.

Air-dry clay is very easy to work with. I think it handles more like real clay than polymer-clays like Sculpey. And you don't have to bake it, just let it dry (a real plus during the summer months).

I also use it to make quick molds and impressions.

I had some white clay (from Polyform) left over from another project, and I don't like to mix partially dried clay back into the main blob. So I decided to press some gears and cogs into the leftover clay to make a quick Steampunk jewelry pendant. With some paint and embellishments, this is a good technique to get a fun surface texture for jewelry.

I thought it would be translucent enough to make a good diffuser for a NeoPixel pendant. But the clay is actually fairly opaque at anything more than a millimeter thickness. That is way too thin to make jewelry with because air-dry clay is brittle and breaks easily (a backer board or thick parts are best for jewelry).


Steampunk jewelry pendant made with air dy clay and NeoPixels
You can see that the NeoPixel lights only show through where the clay is very thin. Luckily, the rest of the pendant is thick and makes for a strurdy piece of Steampunk jewelry.


But I had accidently made some of the impressions from the gear so deep that the light from the NeoPixels shined through quite nicely. A few even poked all the way through. The rest of the piece are very thick however, so the pendant is sturdy. Overall, it creates a nice effect.

I need to paint the surfaces to make it prettier, but somehow leave the indentions unpainted. It might take a few tries to get something attractive. But air-dry clay is cheap and quick to work with. So I can try a lot of different techniques cheaply and quickly.

Also, I know that polymer clays have a wide variety of translucency. And my diffusing experiment with 3d printed NeoPixel jewelry proves that even PLA has different light transmitting qualities. So there might be other air-dry clay brands that work much better with technique. I'll keep you updated.

Also find me on:
FACEBOOK -or- INSTRUCTABLES -or- YOUTUBE

Tuesday, June 26, 2018

EL-Wire plus 3d Printed Bracelet Project

Found some pics of an early jewelry experiment combining EL-Wire and 3d printing. This bangle, or maybe a bracelet, has got to be one of the simplest designs I've done with this combination of technologies, but it's still effective.

There is very little non-structural plastic in the design. That's not usually an important consideration in my jewelry making ---  in fact, I get way too elaborate with both structure and decoration.

EL-wire and sine wave 3d printed jewelry bracelett
The EL-wire loses some of linear appearance thanks to the undulating repeating pattern

But when I design something as a 3d print I tend to think more like an engineer. So the simple design is pleasing to me because it means I found a basic concept that works. I like it when the most basic form works with no extra parts or decoration needed.

Or maybe I'm just happy because I like it even without a single gear or wing or key or even an antiqued brass raven skull. Not everything has to be Steampunk.

This first-test version is a simple sine-wave-shaped 3d print. The EL-wire runs through a series of holes in the center of the wave faces. This holds the EL-wire in place with friction. And it breaks up the linear shape of EL-wire visually.

EL-wire and sine wave 3d printed jewelry bracelet
The EL-wire runs down the center of the sine wave shaped 3d-printed bracelet.

It's also textured and bright enough (bright pink plastic) to look fun and read well in daylight. It's comfortable to wear and durable. Not bad for a first test of concept.

(Also check out my EL-wire party night light project)

I know these early devstage pics aren't the best, so I'll try to find the actual objects again and grab some better images soon.

Also find me on:
FACEBOOK -or- INSTRUCTABLES -or- YOUTUBE

Monday, June 4, 2018

Run an I2C Bus up to 100' on Ethernet

Here's something I didn't know I needed. It's new breakout boards from Sparkfun and another, slightly different version from Adafruit that lets you extend your Arduino's I2C bus up to 100' using Ethernet cable. 

The Sparkfun version uses a PCA9615 chip and their Qwiic connect system. The Adafruit version uses the LTC4311 chip and their STEMMA QT connector system. Both breakout boards also have breadboarding holes for connecting to power, ground and the I2C lines either by soldering wires directly or with pin headers.

The sensors and/or the microprocessor get connected via the Qwiic/STEMMA connectors. The two systems are interchangeable. The long-run signal is sent through the Ethernet line.

The Sparkfun version requires a board at both ends. It also has an Ethernet port built in. The board actually translates the signal and passes it to the other board where it is translated back into an I2C signal. This version also has the ability to send mixed voltages for power and signal, with the configuration selectable by jumpers.

The Adafruit board is more like a booster/active-terminator. Placed (usually) at the beginning of the cable (next to the microprocessor) it boosts and cleans the signal so that it can be sent farther. You can extend the range with a longer run using just the STEMMA port, but will need to connect the STEMMA port to an Ethernet cable for really long runs. A short video explains why.

Both boards work well, so choosing the best option depends on your needs and hardware requirements.

I just spent the last year learning how to create reasonably reliable data packets for Bluetooth and LORA. Now, I can place sensors and displays 100' feet apart and still use the reliable native I2c protocol instead. 

These hardwired boards provide several advantages over Bluetooth, LORA or even WiFi.
  • Power is transmitted over the Ethernet cable, so you don't need to have batteries or power at the remote location. (Unless you're driving devices like motors or solenoids)
  • You won't need to reset and pair your RF devices anymore. No more dropped BT/LORA/WiFi connections.
  • Only one processor is needed. With RF communication, you need a brain for the transmitter and another for the receiver. With these extenders, you only need the one main brain to send and receive signals.
  • Less likely to be hacked than RF communication
Two situations immediately come to mind:
  • Place the sensors, controllers, and MCU in the uncomfortable or hazardous environment, but have the data-display and control panel in a safe, comfortable location. Great for monitoring and controlling machinery from inside the office. Say a greenhouse where the fans, pumps and lights are in a hot. humid environment but you want to see the sensor data and machine-status inside your nicely airconditioned office. In this scenario, the main power supply would be near the MCU so you can pull power for relays and motor drivers easily. It powers the MCU and sensors also. Only the graphical display, inside that perfectly cooled office, is running off the Ethernet extender
  • Place just the sensors someplace like an attic or crawlspace. You can monitor the temperature, humidity or water levels from the display mounted on an Arduino inside your house. Since the power comes from the ethernet cable, you won't have to crawl under the house to replace batteries ever again. 

I2C range extender over ethernet
Let's say I want to monitor and control some lights and motor from a distance. Here's a simple topology that might work. I can read the sensor data off an I2c capable display, and give commands to the MCU with control buttons on the display. This could be great for controlling lights and fans in the greenhouse from the comfort of the air-conditioned office.




I2C range extender over ethernet
Or maybe I just want to put some sensors in a remote location (attic or crawlspace) while keeping my central MCU and command panel inside. I might never have to access that crawlspace again - unless the sensors tell me there's a problem.


Remember, the boards do send power over the ethernet cable, but not a lot. So you might need to provide a local power source if you want to drive relays, motor controller boards, or even a big display. But the docs make it look easy, just change a few jumpers to connect to local power.

I will still use RF in some of my projects. And since this uses the I2C bus, you can still use RF on the serial lines for a hybrid system. If you need to transmit data for a half mile, or a couple of kilometers, then LORA or XBee is still a good bet. Or if  you can't run cables or the remote location changes frequently, then Bluetooth and WiFi are still good options. 

But both of these boards look really interesting for anything I want to install permanently in a nasty or difficult to access environment.

As an Amazon Associate I earn from qualifying purchases.
Shop through our Amazon links to help support this site.

Also find me on:

Saturday, June 2, 2018

Go Outside and Make Something

Wrote an Instructable about getting outdoors and called it Water Walks for Mind and Fitness. The guide explains some of my motivations for getting outdoors, and some of the making activities I integrate into the excursions.

I even snuck a few paintings and drawings into the mix to illustrate how art can be mixed with other activities. This is usually a tech-centric blog, so I don't talk about the visual arts much, even though they are actually some of my favorite hobbies.

A quick landscape I painted. It's not great art but looking at the landforms closely enough to paint them helped me really see the environment around me. People are often surprised that I even know how to paint, but you can write code and paint, they aren't mutually exclusive.


I've noticed that some members of the local maker group tend to separate their outdoor activities from their maker activities. I used to do the same thing, and probably worse. I was kind of stuck in my mind all week as part of my job, and the occasional walking and hiking and camping were all very separate from the creating and designing parts of my life.





I try to talk about using your tech making skills outdoors, like the RC Airboat Instructable, or the welded cascade fountain downspout thingy. But I've never written about the motivational aspect before.

And I've noticed that there is a division between the artists and the tech people. It's like some people think that if you can code then you can't paint or draw - or vice versa. But that's not true. You can paint and draw and still be a good techno-citizen.


Made an RC airboat out of an broken quadcopter drone. Just wanted an excuse to get outdoors and get my make on at the same time. It's always good to get some of your inventions out into the wild.

Eventually, I discovered a way to integrate my designing and other intellectual interests with my outdoor adventures. When I did that, I discovered that both types of activities enhanced the other. Being outside makes refreshes my mind and body. My creative and intellectual side provides challenges and goals when I get outside.

I decided to write an Instructable guide to address these divisions and talk about how I brought several diverse interests together. So if you've been meaning to "get outside more" this summer, check out the guide and see if it might give you a extra motivation for some fun outdoor adventures.

Check out all of my Instructables for some fun projects to do, indoors our outdoors.

Also find me on:
FACEBOOK -or- INSTRUCTABLES -or- YOUTUBE

Wednesday, May 30, 2018

Got the LRA Vibration Motor Partially Working

SUCCESS !!! - well sort of. I can now make an LRA vibrator click and pop and hum - very weakly, but it's definitely progress.

Recently, I posted about finding (I thought) a mythical LRA vibration motor. After spending the last few hours combing through the 62 page spec-sheet for the DRV2605L Haptic Motor Driver Chip from Texas Instruments, I'm almost certain it really is an LRA vibrator.

I'm using the Adafruit Haptic Motor controller board for the chip, so I'm also using Adafruit's library. Sparkfun also sells the same type of board along with a library. Both manufacturers have an excellent, easy-to-use implementation for driving standard ERM vibrators (lots of fun). And both have a function for sending audio signals, like music or voice, to an LRA. However, neither has a good example for the command set for LRAs.

LRA vibrator with Adafruit DRV2605l Haptic motor controller on arduino uno
Hooking up the LRA (or an ERM) vibration motor is easy thanks to Adafruit's DRV2605L Haptic motor controller board. Even a classic Arduino is capable of handling it because all the calculations are handled by the chip. Just send a code over the I2C line and the waveform is executed. Tuning an LRA, now that's a lot more complicated.


Now I understand why, and it's not the fault of Adafruit or Sparkfun - the LRAs themselves are picky and tricky and each one is unique. The driver chip needs a lot of info about the physical operation of the LRA. There are lots of register bits to set and obscure mathematical formulas to deal with before the LRA resonates properly.

Although both libraries give you easy access to these register values, it doesn't do me much good because I don't have enough info about this specific LRA so I don't know what values that motor needs in those slots. Properly tuning the resonance for these motors seems more like a job for a skilled luthier, not an electronics hobbyist.





Nevertheless, I bravely went into the core CPP and H files (a scary thing for me) and set the hex values for some registry slots (according to page 15 of the manual). And what do you know - it works. The LRA moves and every one of the waveforms is distinct. Short or sharp or ramped or rumbling, they are all very distinct. But I have to have my finger touching the vibrator to feel them. When the vibe was still in a phone it would rattle my knee caps. So I'm still doing something wrong.

Compare this to using an ERM. The simple ERM just slings an off-balance weight around a shaft. It's easy to configure and the pulse is powerful. But the waveforms feel almost the same. Out of about 100 different waveforms, I can sense maybe five different feelings. The rotating mass just doesn't stop or start quickly enough, so the difference between a short pulse and a long one is negligible. A double or triple pulse feels like single pulse because the mass is still moving when the next pulse hits.

There may be ways to brake the ERM quicker, I'll explore more and report back. I know when I was making a haptic gaming chair I would hit the rumble-motors with a quick reverse or braking command to create a much sharper and stronger sensation. There could be commands for ERMs in these libraries that I just don't know about yet.

If I can find a well documented LRA cheaply enough I might get one or two. Until then I'll play with this scavenged one and randomly change values. I'm not the only one struggling with this issue of LRAs, so there are some good forum posts about it. But this whole process reminds me of the bad old days when electronics were obscure and difficult and confusing.

On a positive note, if the corporate "they" see enough of us playing with this (spending money) one of them will make us a nicely documented, simple to use LRA so we'll all buy them. Just sayin...

Also find me on:
FACEBOOK -or- INSTRUCTABLES -or- YOUTUBE

Friday, May 25, 2018

Microsoft MakeCode Can Be Embedded

Just found out that you can embed an interactive model from Microsoft MakeCode. Now you can let other people play with your project on your blog - check it out below.

Click on the buttons (center) or click on the gold pads at the edges of the board. Watch the lights and listen for sounds. I put together these simple routines to demonstrate possible solutions to some questions asked at a recent meeting. It took me all of three minutes.


This board is Adafruit's Circuit Playground. It's my new favorite starter board for new programmers. I'm an advanced beginner and I really like it too. It's simple to use, but powerful enough for me to enjoy prototyping on it.

MakeCode also has options for Minecraft and Lego Mindstorms plus several other platforms. So be sure to check it out if you want a simple way to learn basic coding.

I'll definitely be posting more about this great board and the MakeCode syatem.



Also find me on:
FACEBOOK -or- INSTRUCTABLES -or- YOUTUBE

Saturday, May 19, 2018

Trim Command - Fusion360 Quick Tip

Even with Fusion 360's great sketch tools, sometimes your sketch can become cluttered. That's not a big problem on simpler sketches. But in a complex sketch all those extra lines crisscrossing everywhere can become confusing.

The TRIM command lets you get rid of all those extra lines and clean up your sketches so that they're easy to work with.
  • Under the SKETCH menu, select the TRIM command. Or type "T" to invoke the command.
  • If you are not already in a sketch, you will be prompted to select a sketch to work with.
  • The cursor will change to a "scissors" icon.
  • You can select either a single line or "paint" across multiple lines to delete all of them at once

Fusion 360 Trim command


Single Lines: When you move the cursor over a line, the selected line segment will turn red to indicate which portion of the line will be deleted. When you left-click on the highlighted segment, that segment will be deleted (trimmed).

Painting Multiple Lines: You can also left-click and hold the mouse button down as you move the cursor across multiple lines. All line segments that your cursors crosses while the mouse button is down will be deleted.

Since Fusion stops trimming at the first boundary, you must continue clicking line segments to delete across multiple boundaries.
  • Construction lines can also function as trimming boundaries.
  • Although I call them lines, TRIM also works on curves, splines and shapes (e.g. circles, rectangles).
  • However, lines and boundaries must be on the same plane (share a point in space). For instance, you cannot use a 3d spline as a trim-boundary if does not intersect the line to be trimmed.


Notice that Fusion 360 makes intelligent guesses about which line segments you want to delete (trim). Fusion will select segments based on crossing boundary lines and end point nodes. Fusion will trim the line to the nearest crossing or node. If there are crossings or nodes on both ends, Fusion will trim out the center section.

Fusion 360 Trim command
The selected segment will turn red when you roll the cursor over it. Left-click on the highlighted segment to delete (trim) it. If there is only one boundary, Fusion will delete the line up until that boundary.


Fusion 360 Trim command
When there are two boundaries, Fusion will trim the segment that lies between the two boundaries.


My preferred method is to draw all my lines into the sketch. After I've drawn all my basic geometry I then go back and start trimming lines to clean up the sketch. I find that this sequence avoids the problems that happen when Fusion creates relationships and constraints between the lines.

However, these relationships and constraints are also very useful. For instance, Fusion will adjust the gap created if you trim a segment, then move the boundary line.

The TRIM command's opposite is the EXTEND command.

The BREAK command divides  a line into segments at a boundary, but does not delete any part of the line.


As an Amazon Associate I earn from qualifying purchases.
Shop through our Amazon links to help support this site.

Also find me on:

Rainwater Cascade Welded from Scrap

When the rain comes, you still have to find a way to create beauty. I welded this sculptural downspout extension out of scraps from other projects.

I wanted to add some visual interest at a downspout that can be seen from the main entrance. And I wanted to disperse the water in a gentler pattern to prevent erosion.

In the past, I've created splash pads with rocks and channeled it with gnarled, hollowed out tree branches. This time I wanted to use metal.

Welded metal fountain splash block downspout extension rainwatersculpture
I welded a fountain from scrap metal, then discovered that it worked better as a splash block cascade at the downspout. The constantly changing flow of water makes the piece much more interesting to watch.


The project started as a small fountain. The piece was designed for nearly vertical placement. I played around with the shapes and placement of the metal until I got the water motion into an interesting pattern.

It worked well for an indoor fountain. However, the scale was so small that the water's movement remained fairly constant and the repetition caused me to lose interest. I wanted constantly changing visual patterns and sounds.

I went back and added textures and sluices to help vary the pattern. They helped, but not enough.

So I tried the fountain outdoors. I hoped the wind would change the motion enough to keep the fountain interesting. Gentle breezes did change up the pattern of the water flow. But anything more than a gentle breeze blew the water off the face of the fountain.

I tried tilting the fountain to 45 degrees. That kept the water on the metal in most conditions, but it also changed the piece from a fountain to more of a cascade. And it looked very odd having a slab of metal suspended in the air at a diagonal.

I thought about embedding the angled version into a miniature landscape, but that started to seem like a lot of work.

Welded metal fountain splash block downspout extension rainwater sculpture
You can see how the splash block fountain spreads the water over a larger area to prevent the erosion.

Then I noticed that one of the downspouts was starting to create a ditch. "Why not put that so called fountain at the downspout," I thought. And I did.




I like the way it looks, and the openings along the edge let the water drain across a wider area. The visual appeal is increased because the volume of water exiting the downspout varies constantly. These random fluctuations make the water choose different paths around the gates and curves.

Welded metal fountain splash block downspout extension rainwater sculpture
The edges of the splash block fountain are open, so the water gets dispersed over a much wider area than when it exits the downspout directly. Most of the water cascades down the right hand side, but when it's raining hard, the water also pulses through the channels on the left.

Also find me on:
FACEBOOK -or- INSTRUCTABLES -or- YOUTUBE

Sunday, May 13, 2018

PauseWaitDelay - Coding in Visual SpaChinglish

I just confused a group of new programmers. I tried to introduce them to Microsoft's MakeCode. It's a cool new online visual programming environment that is both simple to use and powerful. The program's creators went to a lot of trouble to make it fun and easy to learn.

I, however, managed to make it seem complicated and confusing - "My work here is done."

To be fair, it was an impromptu session so I had not prepared or practiced in any way. I just pointed them to the site, not intending to teach anything, much less hold an hour long spontaneous lesson. But they all seemed really interested, so I jumped right in. Who needs to plan or prepare - just start talking, right?

At left is the MakeCode IDE using "Pause." The center shows the Arduino IDE using "Delay." And at right is the Scratch environment using "Wait." The commands all accomplish basically the same thing, they just use different wording. I'm not at all confused, are you confused?

It wasn't that bad really, I don't think I scared them away. But I noticed the occasional blank look and realized I was using the wrong term sometimes. And I did get surprised by the odd (to me) ways that Microsoft tweaks the Arduino programming environment.

Or maybe the  new kids were simply overwhelmed and didn't actually notice my gaffs - but I did.

See, I use all kinds of programming environments, so switching between them feels natural. Sure, I forget which environment I'm in sometimes. But to me it's like using a new TV remote control or driving an unfamiliar car. It takes me a while to make the change mentally and I'll reach for the shifter in the wrong location, or hit power button instead of source.

Or maybe it's like when I try to use my high school Spanish and I get stuck so I blurt out an English word because I can't conjugate well. Or when my friend's grandmother has to use English because her grandson doesn't understand her in Chinese. Living in a multilingual culture is awesome, if somewhat frustrating at times.

So it's no big deal, but I feel bad for any confusion I caused. The new coders probably expected a precise and concise lesson. That's what programming is about, right - precision? Instead, I gave them a scrambled introduction to multiple variants of IDEs. In fact, I kept calling it MakeBlock instead of MakeCode - I can't even keep the vendor names straight.

Another example: The Arduino IDE uses "Delay" to specify how long the program should wait before executing the next command. But MakeCode uses the word "Pause" while Scratch uses "Wait." They all do the same basic thing. But me using the words interchangeably probably didn't make things easier for new programmers. A month from now they will think it's funny. But it was bad for a first experience.

(At least I didn't talk about whether time is measured in seconds or milliseconds, or the difference between wait, timer, rest and beat...)

Like every IDE that attempts to simplify a complex task, the MakeCode environment has some quirks. It creates variables of a certain type without labeling their type, then allows the variables to get plugged into slots where they don't belong. My example is the RGB values being considered "strings" in certain commands, but "integers" in other places (or maybe the other command casts the strings to integers).

No big deal to me, I'm used to dealing with var types so the error code at least made sense to me. I figured out a way around it. I'm comfortable troubleshooting conflicts, that's part of coding. But me fumbling around surely made the process look more difficult than it really is. That's my fault because I made assumptions that weren't true. Every environment is different and I was poorly prepared.






Oh who am I kidding, I can't keep all the quirks straight for one environment, much less five. I fumble around until I remember how this IDE works, or I just find a way around the so called issue. And that's part of the appeal of a drag-n-drop system like MakeCode or Scratch. You can wander around and explore options quickly without all the tedious overhead of setup. So maybe it was a good lesson and showed the new kids how to just keep playing until you have figured it out.

We'll see if any of those fledgling coders come back. They seemed excited and entertained, and they promised to practice at home (MakeCode is web based, so they can carry the code anywhere). One even said they were going to buy a Circuit Playground from Adafruit to practice on. So maybe I didn't make it seem too boring or complicated after all.

They might never ask me for help again, but I sure hope we have some new programmers beginning their journey. And MakeCode is a pretty good way to start.


Also find me on:
FACEBOOK -or- INSTRUCTABLES -or- YOUTUBE

Friday, May 11, 2018

8-Bar plus 24-Ring equals NeoPixel Belt Buckle

Sometimes being slightly disorganized works in your favor. I keep a tray filled with every size and shape of NeoPixels. The tray lives near my electronics work station. When I find a nifty part and want to see if a NeoPixel will fit that part, I simply reach into the tray and grab an example to test.

The collection comes in very handy so I leave the LEDs in the tray at all times. I know I should put them back in their anti-static bags and put the protected LEDs back in the main collection. But I don't because, well... because I'm kind of lazy.

This week, I started playing with electronics again after taking several months off for other project types. And when I pulled out some NeoPixels to test fit onto a part I got a pleasant surprise.

Neopixel 8 bar and 24 ring as jewelry
Notice how perfectly the 8-pixel bar and the 24-pixel ring fit together





The 8-pixel bar and the 24-pixel ring had stuck together and came out of the tray as a pair. The combination created a perfect shape for a belt buckle, or broach, or maybe a hair ornament. I'll have to cover them of course, and hook them up to an Arduino. I just finished playing with decorative round covers exactly for this purpose.

Finding this combination by accident is funny. I have tested all the ring sizes in various combinations. There are enough different sizes of NeoPixel rings that you can make many combinations of concentric rings - including an LED clock with 60 pixels for the second hand.




But for some reason I had never combined or even tested the bar together with the rings. I felt silly, but happy because the universe had gifted me a new combination without me even searching for it. I think maybe I'm supposed to make a few pieces of light-up jewelry as my transition back into my electronics hobby.

Find out more about NeoPixels at Adafruit. (the 8-bar and 24-ring are two of my favorites). By now, Adafruit has the same configurations in RGB, RGB plus white (in several Kelvin colors) and even a version with faster refresh rates called DotStars.

If you've never hooked them up to your Arduino before, grab yourself some NeoPixels and start lighting up your world.


As an Amazon Associate I earn from qualifying purchases.
Shop through our Amazon links to help support this site.

Also find me on: