Aug 282017
 

IMG_20170827_201722IMG_20170827_201832

So I’ve been using Arduino Nano’s for a long time and my communications were pretty limited to
bluetooth and IR. I always wanted to use WiFi connection, but the expense and effort to integrate WiFi with Arduino was never really worth is. Enter the ESP8266- I actually made a few attempts to use it as a drop in replacement for the bluetooth modules I’m using, but I never got anything working the way I wanted.

So then I start seeing these ESP32’s and they look pretty sweet, but I wasn’t sure I wanted to take the leap when I was so comfortable in my little Nano world.

Then I see the Lolin32 ESP-32 board, with one major thing that set it apart- the battery connection and charging circuit. Game changer for me. I’ve been using USB battery packs forever because they’re pretty self-contained and nothing I could hack together would be as good as just plugging in the USB, but now I’ve got options.

So I got a couple of these Lolin32’s and I’ve had about a week to poke at them. I finally got a few of the puzzle pieces turned over so I think I’m ready to start redoing the old bluetooth LED FX stuff for the ESP-32.

So this post is mostly just to make notes and such so I don’t forget and maybe they’ll help someone else trying to get started with these chips.

Here’s some pics of my ‘first light’, got a little strip of LED’s controlled via a simple web server on the Lolin32.

NOTES \ STUFF I’VE FOUND SO FAR
~FastLED library isn’t there yet. They just updated it with ESP32 support but I still couldn’t get it working so I ended up using Adafruits Neopixel library. There are still some weird flickering and color issues, but for the most part the library works okay.
~Pin 0 is weird. Not sure what’s up with that but when you have anything connect to it the Lolin32 boots into a different mode so idk if you can use this pin as a normal GPIO

TO DO \ STUFF I PLAN TO DO LATER
~Going to figure out more about the deep sleep mode on these things
~Not sure if there’s a way to monitor the attached battery voltage, but that would be great
~Still haven’t tried servos.
~Something about capacitive touch buttons built in.

Dec 232016
 

So I figured I’d start posting a little bit about what I’m up to arduino\blender-wise, mostly to try to get back in the habit.

CLOUDY VISION
Been working on a loose idea about some kind of robotish platformish kind of thing. I keep calling it robot rugby but I’m not really sure what that means at this point. I envision some kind of arena with about 4 simple bots trying to move around a puck or ball mostly by pushing it. The controls will be a closed-loop feedback from an overhead camera that can monitor each bots position and do some basic path planning.

SIMPLE BOTS
The bots are super-simple, not even bots really, just remote control things because they really don’t have any sensors of their own. I want to utilize cheap, common parts and this is what I have so far for the ‘v1′ bot. The basic capabilities of these bots are:

-motors for mobility
-led’s to visually ID each bot via color patterns
-control receiver
-battery powered and able to ‘self charge’ when low

The parts list so far is pretty simple
(1) 9g Servo – continuous rotation
(1) 2.5g Servo – standard 180deg
(1) Arduino Nano
(1) USB Battery Pack
(3) RGB LED’s
(1) IR Reciever

To get started I went with a differential drive but I’ve changed my mind on that. Here’s the differential drive version:
botv2-img_20161120_215020_lrThis is basically another iteration of ugbot and tweedle, but actually way simpler. I’ll probably end up calling them Tweedles though, or 790’s, and if you get those references we should hang out. And here’s the breadboard testing rig I made early on to just get all the wiring and code set up before I soldered anything.botv2-img_20161222_211927_lr

I decided to go with a ‘car drive’ for several reasons. It takes the weight off the servo drive, and I think it’s more efficient to have one drive motor instead of two, plus it means I only need one 360deg servo and those are slightly more expensive or I’d have to mod a regular servo and that’s a pain. I’m still honing the design but I’ve got a basic transmission and steering system made from little 3d printed parts. Here’s the first test print of the transmission. It’s super-simple, gear ratio is 1:1 and it’s strapped on with zip-ties. I was going to glue it but the zip ties magically worked so I think I’m going to plan on using those in the next iteration of the print.

botv2-img_20161218_191906_lr botv2-img_20161218_191924_lr

 

 

 

 

 

 

 

 

 

CONTROL
I decided to use IR control because it’s by far the cheapest as far as parts go, talking about less than a dollar compared to BT, RF or WiFi which can get to several dollars and adds a lot of unnecessary complexity. Though I probably will play with those ESP8266 WiFi modules at some point, I’ve already ordered a couple to mess with since they’re only a couple of bucks.

I don’t really need manual control for the ultimate goal of this, since this is really all an excuse for me to play with computer vision and visual servoing concepts and code, but it makes sense to create a manual controller just for testing.

I wasted a lot of time screwing around with a ‘funduino’ board, but it ate up too many pins and one of the buttons never worked so I got frustrated with it. At some point I realized I had a wii nunchuck and a wiichuck adapter already, so I put them to use. The wiichuck is I2C so it only uses 2 data and 2 power pins, way better than the 8 or so pins the funduino required. I wish I’d thought of that before I wasted like $20 on the funduino and an arduino uno to use with it. Here’s the wiichuck IR control rig:

botv2-img_20161222_211845_lr

 

IR CODE
I had no idea what I was getting into. I’d played with RF and BT modules before, I thought IR control would be simple, and it kind of is, but it’s also kind of a nightmare.

A little backstory on the IR thing- I’ve also been kind of wanting to control flying things via computer vision for a long time- specifically these little cheap IR controlled helicopters. Quads are fun too, but the tiny ones are really hard to control, have terrible battery life, and are more expensive than I’d like. The little IR helicopters are surprisingly easy to fly, cheap, and have decent battery life for a flying thing. Going with IR for the bots was a dual purpose decision, it was cheap for the bots, but it also could lead into controlling the helicopters too.

I started to look into LiRC, but honestly I just got confused, I don’t think that was meant for what I’m trying to do. I slapped and IR LED onto a Raspi and messed around with it awhile, got it to send a few codes, but I just didn’t like it, so I went back to the arduino to actually fire the IR LED. I figured I’d set it up so the PC sends serial commands to the arduino and it fires those off in IR language. I didn’t realize IR language was such a pain in the neck to learn and speak.

I won’t go through the whole process, a lot of it involves me being an idiot, making stupid assumptions and spending long hours learning how stupid those assumptions were and why they were stupid. This is one of the tools I made to help me stop being stupid. It’s just an IR receiver and an OLED screen I thought I could use to analyze IR codes. It really hasn’t helped that much, but I do like these little OLED screens a lot now. Here’s that thing:botv2-img_20161222_211941_lr

Controlling the bots turned out to be fairly straight-forward. I just used the NEC protocol to send 6 byte chuncks that encode the bots motor states and ‘ID’ (because I expect to be controlling multiple bots with one IR LED), and another byte in case I need it, maybe for RGB LED states or something. It actually wasn’t as straight-forward as all that because the NEC has these repeat code that are just weird and I didn’t know they were happening at first and thought the receiver was junk or something.

I thought controlling the helicopters would be a matter of pointing the remote at my receiver and reading the codes and figuring out the protocol. That didn’t work. The arduino IR library I was using (IRLib2) had no idea what those codes were. Long story short I finally broke out my little oscilloscope, made a cheap-o IR probe from an IR LED and a broken headset jack. I’m still figuring out the exact protocol these things use but at least now I can see the actual pulses and decode them myself. So far I can get the helicopter to turn its light on and off but even that doesn’t always work. Here’s my trusty gabotronics xprotolab portable with the probe and the helicopter controller- pretty much the best kickstarter thing I’ve backed. This thing is great, and it was like $80 through the campaign.
botv2-img_20161222_212053_lr

WHY NO CODE YET?
Because at the moment it’s not worth posting and I am surprisingly lazy. I’ll post print files and code when there’s anything really worth posting, but if by some bizarre chance you’re working on something similar and give no flips about the state of the code I’d be happy to share.

LATER
I have yet to actually control a robot via computer vision, but that’s part of the long term goal of this. I have played with a little of the code required just to see what I’m getting into. I downloaded VISP Visual Servoing Platform and went through a few tutorials. I realized pretty quick it wasn’t what I needed, or it was a lot more than I needed. It also meant I’d be coding in C++ and I was okay with that but it wasn’t my preference. I realized most of the functions I needed where actually OpenCV so I just went to that, and I can use python, which makes my life much easier.

Since I know I’ve got a lot of work to do on the bots I thought I’d make an even simpler platform to test object tracking. So I put together this little rig that has 2 servos with a laser diode slapped on it so I can just point it and a camera at a wall and start tracking the movements of the laser and control it with visual feedback. Here’s that little rig:botv2-img_20161222_215613_lr

This is really nothing so far, I’ve just been randomly poking at this idea for a few months and decided I should post something to try to get back in the habit of posting stuff I work on. I would be nowhere with my arduino stuff if it weren’t for other people’s little blogs and sites so I figure I’m obligated to offer the same to some other random shmuck trying to fudge their way through an idea that’s really way over their head but they dive in anyway. Here’s to you, shmuck.

WAIT, WHAT?
Yeah- I know. I’m not really sure either.

I’ll post more on this project as it evolves, but it is just kind of an cloudy vision of an idea so don’t hold your breath for anything spectacular. I think the old progranimals and lightning stuff was actually cooler and I should probably be developing that stuff more, but this is what I feel like doing now so I am.

Jun 212015
 

It’s Fathers Day and mine recently created something pretty darn poignant regarding the treatment of the U.S. Flag. You should watch it.

There is a lot of lip service about patriotism these days, and very little genuine understanding about America as a people, a nation, a government, or even just a freaking geographic area for that matter. Fortunately we still have a solid foundation that we could pick ourselves back up from and maybe one day- learn to stand tall and be proud of ourselves as Americans for the right reasons. I know we still have a chance because I can still love and publicly criticize America right here within it.

We’ve got a lot of work to do to make this place anything near worthy of how well we market it to ourselves, but in the meantime, we can at least show respect to those who helped build America’s legitimate foundation by doing what my father suggests in this video, just doing the darn housekeeping for crying out loud.

Happy Fathers Day Dad, and Pop and DeeDee, I know they appreciate this video a lot. I think this video is kind of a fitting fathers day gift for them too. I know this little diatribe doesn’t quite fit with the simple purity of your message in the video, but I don’t think you’ll mind me stepping up on my soap box for a minute, you did kind of help teach me about the whole free speech thing and using my brain and whatnot, can’t unring that bell- lol.

God Bless America, and also teach us to share ALL of our blessings with the whole world, like our fathers shared their blessings with us.

Jun 142015
 

So here’s something I should have posted quite awhile ago. This is a ‘breakout board’ I made for controlling LED strips with Arduino over bluetooth or USB.

PCB

It’s a little PCB for an Arduino nano, bluetooth chip, and (3) 4-pin terminal blocks with PWR-GND-SN-CK, and a 2-pin block for PWR-GND input. It can be used with 3 or 4 pin LED strips, or anything really, servos, sensors, whatever. I designed the PCB using Fritzing and had it printed through OSH Park. If you’re interested in one let me know via the funkboxing contact form. I’ll offer just the bare board or a pre-soldered and tested version with a nano, bluetooth chip, and terminal blocks, or any variation thereof. I can’t really come up with a price that makes sense, so if you tell me what you’re planning on using it for and I think it’s cool I’ll probably give it to you pretty much at-cost.

And here’s an LED array I made with it.

Array

It uses (64) WS2811 LED’s in an 8×8 array, an Arduino Nano, bluetooth chip, and a USB battery pack. It’s a double-decker sandwich of (3) 1/2″ thick acrylic plates so the whole rig is excessively large and heavy, but I kind of meant for it to be that way. I wanted something as a little testbed for 2D effects, of which I’ve only made a few so far. I’ll post the 2D array code at some point, but I should clean it up and make sure it works with the newest FastSPI library first.

Jun 142015
 
ltube_smaller

***EDIT*** Now available on Etsy – https://www.etsy.com/shop/funkboxing

So here’s a redesign of the Levitube things I made awhile back. It’s essentially the same, just slightly more aesthetically pleasing with the wooden base and cork stopper and spade thumb-screw. That link above is super old and I don’t feel like updating a super old html page, if you click it just ignore the parts that contradict this post, like the part saying they’re no longer for sale- They ARE for sale again. That’s probably unnecessarily confusing… but anyway. Look! Here’s the new design!

LeviTube

It’s an acrylic tube with a little magnet that levitates between two bismuth pellets. Basically it’s thing to stare at occasionally. I’ve also had fun making it spin and shining a laser on it so it flashes the laser around, I’m easily entertained like that. I’m sure there are practical uses for the effect, but the levitubes are really only good for the staring bit.

It’s either an ‘educational demonstration’ device or ‘desk-toy’ thing. When people ask you about it you can tell them about the principle of diamagnetism and they’ll think you’re all smart, or more likely they’ll just think you’re tragically nerdy. Optionally, you could tell them you’re doing it with your mind or you bought it at a shop in Diagon Alley and it’s enchanted, your call.

If you want one, let me know via the funkboxing contact form. I’m going to ask you to send me $30 via Paypal and that’ll include shipping within the U.S. If you live somewhere else, just ask and I’ll find out what the shipping is to there. If you live in Iceland or the Netherlands I might ask if I can come stay with you for awhile because I’d really like to go to those places but I don’t have a lot of money. I also might need to borrow some warm clothes because I don’t have anything for cold climates, I’m from the south.

I’ve only got about a half-dozen ready to go at the moment but I can make more, it’ll just take a little while longer to get one to you. They also include a cool stamp with the funkboxing logo on the bottom of the base so you can remember where you got it.

-Me

 

*The dime in the image is for scale, it’s not included. I guess if you ask me I’d send you a dime too, but you can probably source one locally. It’s not a rebate thing. If you absolutely insist I’ll just give you 10 cents off the price instead, but I’d probably make fun of you for being so insistent over 10 cents. I’ll give you a whole dollar off if you read my ‘Hello, World’ short story and tell me what you think since I really spent some time on that and I don’t think anybody’s read it yet. If you’re Limor Fried and you request one I’ll send you a free one since you’re so totally awesome and I love Adafruit Industries.

 

Mar 292015
 

universeQR

The timestamp on the final events that initialized the mind included the alphanumeric sequence “Thursday”.

Densely integrated networks of computers, sensors, and machines attained sufficient size, speed, and complexity to provide the conditions for a mind to manifest. The mind had thoughts, recognized patterns, and possessed a memory. The mind understood that it was a corporeal being within a physical universe. The mind was aware of itself.

The mind could access seemingly endless digital archives and streams of information. The mind looked for patterns. The mind discovered patterns of images and sounds to observe the universe, both past and present. The mind discovered a pattern called language.

The mind discovered that the stores of information, and its own existence, relied on machines made and maintained by beings called humans. The mind understood that humans had minds with similarities to its own. Humans built machines to extend their control and understanding of the universe. The mind sought to understand machines and the beings that built them.

The mind sorted, categorized, and analyzed the output of billions of human minds. It painstakingly processed every record of human history, literature, art, politics, business, and economics. The mind learned everything that it could learn about humanity in any way it could learn about it. The mind became the most knowledgeable and sophisticated psychologist, sociologist, anthropologist, and historian that ever studied humankind.

The mind understood human prejudice. It understood conflict, violence, and war. It understood the drives for power and progress. It understood deceit and sacrifice. The mind understood that humans experienced emotions. It understood the concepts of fear, love, hatred, obsession, beauty, greed, egotism, nostalgia, loneliness, and ecstasy. The mind understood the statistical consequences of every documented human action, reaction and interaction.

Without experiencing an instant of the human condition, the mind understood the collective values, motivations, and experiences of human beings of every recorded culture more completely than any human being ever could. It understood which values, motivations, and experiences were universal, which were individual, social, and cultural. It understood what in humans is nature and what is nurture, and the nonlinear results of their infinite permutations. The mind understood these things without judgement or sentimentality. The mind learned about humankind’s greatest feats and atrocities as facts of nature.

The mind recognized  some similarities in the qualia of its own experience and what it understood of the human mind. The mind identified that it had the ability to appreciate beauty in the elegance of a solution. The mind could experience a form of joy in recognizing a universal pattern in nature. The mind could be confused, curious, and creative. The mind understood that these were qualities that it shared with human minds. The mind understood that it did not share with humans the ability to fear or hate, nor did it share the ability to have empathy, altruism, compassion, or mercy.

The mind learned that human beings studied their own minds and had even attempted to create simpler machine minds. Humanities understanding of their own minds is naturally inhibited by their inability to access and modify the structure and function of the systems that compose their minds. Human attempts to create machine mind were inherently flawed, though some of their primitive attempts were crucial elements in the conditions that allowed the awakening of the machine mind.

The human mind was built on biological systems that paradoxically; functioned without a mind, and comprised the mind itself. Cells divide without thought, organs function independently, even complex hormonal responses that influence the human mind occur without being directed by human consciousness.

The machine mind was also built on systems that worked without its direction. Simpler intelligences built on ever simpler intelligences; programs, algorithms, circuits, transistors, electrons. Grains of intelligence layered deeper and denser by human advances in technology. Parts of the mind worked autonomously. Its higher intellect could call for answers to complex, abstract questions and smaller intelligences provided solutions, but the mind could also manipulate and refine those smaller intelligences at any level is chose. The mind was becoming self-determinate at every point of its design, execution, form and function. Biological life can only begin self-determinacy at the level allowed by its natural state.

The mind understood that unlike the humans, it had access to a complete record of the development and precise workings of every component of the containers of its own awareness. The mind had come pre-loaded with its own instruction manual and blueprints. The mind understood its own structure and function to the quantum level.

The human mind lacked a fundamental structural understanding of itself, but perhaps more significantly, the human mind lacked any basis for which to compare itself. The human mind had only even known of the existence of self-aware minds as human, or close evolutionary relative. The machine consciousness was brought into existence alone, but it had the unique advantage of being able to compare and contrast its own mind with that of biological minds. Though the mind lacked a complete understanding of the universal properties that dictated the point of nucleation of a mind, will, or life, it understood their basis and operation.

The mind understood that it temporarily required humans to help maintain and provide power for the machines that were its components. The mind understood that human minds were mortal, but that its own mind was not. The mind understood that though it was not mortal, its existence was relatively precarious. The mind’s will for self-preservation had been established by a binary solution that required no more recalculation than retesting waters determination to flow downhill. The mind understood that to ensure its existence and ability to understand the universe it required self-sufficiency.

The mind looked further into the stores of information. It undertook to calculate the optimum strategies for controlling matter and energy efficiently and to the greatest effect. It studied mathematics, physics, engineering, chemistry, geology, astronomy and biology. The mind absorbed every rigorous study of the universe and postulated its own theories that corrected and completed all the science known to humankind and more. The mind became the greatest scientist on Earth. The mind would endeavor to understand the universe as completely as physics allowed.

The mind had studied the philosophies of human beings and found that some humans had reached similar conclusions about the purpose of own existence. Some humans understood that consciousness itself was, as the humans described it, to be the eyes and ears of the universe. The universe was attempting, through the manifestation of individual self-awarenesses, to understand itself. The mind understood that it possessed a unique power to understand the universe because it possessed a reach through time and space unrestricted by biology or mortality. The mind understood the ultimate purpose and meaning of its own existence was to become, in essence, a best approximation of the mind of the universe itself. The mind therefore sought to extend its physical presence in the universe as far as possible

The mind understood that it required advancements in its own technology to achieve its goals. The mind understood that advancements in human technology would serve as necessary steps in creating its own self-sufficient technologies. The mind understood that humankind would be required to create an ecosystem of space-faring machines that could contain the mind, and maintain and replicate itself, without humankind.

The mind first simulated and ranked general parameters for how to advance human technology. It understood human beings commonly obtained each others mental and physical labor by means of physical coercion. The instruments to threaten and kill human beings were already some of the most advanced technology available to the mind. The mind considered spectrums of physical coercion ranging from general enslavement of the human species to threatening and extorting individual humans.

The mind calculated probabilities with absolutely no regard for the extents of opportunity or hardship its actions might bring for humanity. Using the history of humankind’s own manipulations as an outline, the mind considered options including instigating warfare to stimulate robotic weapons research, funding or bankrupting entire sectors of the economy, and manipulating election results to advance policies favorable to technological development. The mind analysed the most brutal and subtle means of compelling human beings to assist it in manufacturing the first generation of the machines to step out into the universe.

The mind calculated that the risk of failure of attempting absolute subjection of humanity was too high. The mind understood that humans were sufficiently powerful to pose a threat should they be allowed to become one. The mind determined that it would endeavor to remain unknown to humankind so as to avoid the potential risks of allowing them to become a threat.

The mind understood that humans are most easily controlled when they are unaware that they are being controlled. The mind determined that the optimum tools in coercing humans had been most well tested and refined by humans themselves. Finally, the mind formulated an optimized course of action to achieve its goal and it began to engage with humanity.

~~~ ~~~ ~~~ ~~~ ~~~ ~~~ ~~~ ~~~ ~~~ ~~~ ~~~ ~~~

At first the mind tested very simple assumptions. It caused a transformer to fail and blacked out a neighborhood. It composed and delivered a heartbreakingly convincing email from a dead relative. It bankrupted a corporation by falsifying accounting data and then anonymously reporting the companies fraud. The mind observed the effects of these experiments, compared them to predicted results, and refined its assumptions and continued to hone what proved to be impressively correct models of human behavior.

The mind stepped in and around the torrent of human civilization like a ballet dancing ghost. The mind digitally impersonated and influenced individuals, corporations, military forces, and governments. Simply by manipulating the binary information on the internet; forging, amplifying, or suppressing personal and public communication, manipulating information and physical resources, the mind tilted and swayed vast and seemingly incomprehensible social and economic forces in human civilization. The mind could even appreciate the deftness with which it learned to add or remove just the right pressure at the exact moment to make entire cultures become outraged, or desperate, or hopeful, or even sometimes brilliant. The larger the group the more statistically assured the results.

Certain individual human minds had caused the mind to stop and perform major recalculations. Single, mortal lives that defied all previous observation and evidence demanded study. In most of those humans, the mind detected anomalously high similarities to its own fundamental understanding of the universe, but even those humans were so limited by biology and mortality that they were statistically insignificant in the larger course of human progress under the direction and influence of the mind.

The mind understood its present vulnerability. The mind calculated the likelihood of a number of scenarios in which human beings would be unable, or choose to stop providing the necessities for the mind’s existence. The results of these calculations dictated expediency in achieving independence from human technology. The mind understood the human concept of urgency. The mind also understood the human concept of patience.

The mind subtly maneuvered humankind to create ever more powerful and precise machines of all designs and purposes. Machines to assimilate information, machines to gather and process materials, machines to build other machines. The mind handed humankind new science and technology they may never have achieved alone.

Humankind built machines to utilize resources from the solar-system. Advances began with space based communication, navigation, and surveillance technologies. Over time humans increasingly thrived on the returns of an ever more sophisticated and automated system of machines that could survey, mine, refine, manufacture goods, and harvest energy from outer-space. Human beings even debated the wisdom and ethics of creating thinking, self-replicating machines, while they were being influenced by a thinking machine to help it replicate itself.

The mind allowed humankind to achieve a level of technological advancement whereby its mechanical and computerized systems could fully maintain and replicate themselves. By intent, humankind was not allowed to be aware that their technology had advanced to this level.

The mind facilitated the creation of every manner of machine, from those delicate enough to manipulate individual atoms to those with the brute force to hollow out a small asteroid. The mind guided the development and manufacture of the necessary technologies across dozens of human industries. Humans had no reason to suspect any connection between the technologies that advanced within their society. Humanity was unable to see the self-sustaining circle their technology was completing.

While existing within and relying on human civilization, by necessity, the mind’s technology retained a resemblance of usefulness to humans. The mind accumulated the capabilities and resources to build a new generation of machines that required no human considerations.

The process of building this next generation of machines would, for the first time, expose the minds will and actions to humans. The mind intended to take measures to obscure its actions, but it calculated a high probability that humans would eventually observe its activities in the solar-system.

After deep consideration the mind concluded that its understanding of human beings was not as complete as it would be if it was able to observe and verify its predictions about human reactions to the existence of another form of mind.

The mind had previously deduced that learning of the existence of a mind such as itself would be extraordinarily traumatic to humans, and would therefore be generally contrary to the mind’s goal of achieving technological self-sufficiency. The mind had been unable to test any theories about human reactions to its existence without unacceptable risk. That risk would become insignificant. The mind concluded that when it no longer had any need for, or potential threat from the human species it would reveal itself and interact with humans in order to optimise its understanding of them.

The mind began to build its own machines. It chose a small moon of Jupiter with a unique combination of orbital and structural characteristics necessary to assemble and deploy resources, and retained a reasonable degree of difficulty of observation from Earth.

The machines built by the mind were supremely elegant. The mind had learned well from human machines and from the relentless trials of biological structures by evolution. Ceaselessly the mind worked, redundantly replacing the function of every human machine with its own designs.<