Email the author:
I played a bit with the D1 Mini some time ago, doing things like an SMTP client, web servers, and so on. Today, I nearly drove myself to distraction trying to do a little simple I/O with it, but having all kinds of mysterious problems, depending on the I/O pin I chose. Example code to, for example, flash the LED on the board worked fine, but my code either locked up the processor, or just didn't pick up changes to the I/O pin. After a bit of web surfing and a lot of head scratching, I figured it out. My early experience with Arduino boards suffered from similar issues, until I figured out that the D1,D2,...etc.designations had no relationship to the actual pin numbers *or* the port/bit designations on the processors themselves! I'd been using CPU pin numbers, when I should have been using the D1/A1 designations (although I'd still like to slap the person who decided to be inconsistent and use A# for the analog bits, but only #, and not D# for the digital bits in the Arduino IDE!!
Accordingly, when I started plugging in wires to the Wemo boards, I thought, "Okay - I know how this works now!" and proceeded to refer to the pins by the D# designations *silkscreened on the PCB*, but NOOOooo! Those have *nothing* to do with the actual I/O bits you have to use for things like, "digitalRead(D1)"! Nor do you use the pin numbers on the chip. You have to look up the GPIO# designations assigned to the various I/O pins on the chip, and use *those*! Of course most of them serve double or triple duty and can't blithely be used for general purpose I/O, so there's that... But *why* for the *love of the FSM* didn't any of the many online tutorials I read bother to mention that little detail??? It's working as expected now, but holy cats, guys! Three levels of abstraction and you couldn't be arsed to say, "OH, AND BY THE WAY, YOU HAVE TO USE GPIO NUMBERS WHEN REFERRING TO THE I/O BITS!"??? I mean, REALLY? *sigh*
I spent a number of hours trying to get a shared folder set up between a virtual machine running Raspbian and my host machine (Windows 7) but it just wasn't working. Finally, after pulling together instructions from several different web sites and trying the things they all seemed to agree on, it works. I made myself these notes in case I have to do it again later; I thought they might be of help to someone else as well. Please be careful to note which steps are performed on the *host* and which on the *guest* OS. That's part of where I was going wrong originally.
sudo usermod -G vboxsf -a <your username on the virtual OS> (adds user to virtual box shared files group)
log out (of the virtual OS) log in (on the virtual OS)
There's just been another mass shooting in the United States, and it set me wondering where all this anger and angst comes from.
I think one of our biggest problems in the United States in particular is being told you can be anything you want/do anything you want with your life, only to discover far too late that it's a lie. Not everyone can be a doctor, or an astronaut, or a fireman, or a lot of those other things kids always want to be. Personally, I know my 12-year-old self would be bitterly disappointed to hear that he became, not the engineer on the Starship Enterprise, but rather just a fairly good electronics technician at a 2nd-rate company, working to make ends meet.
Those of us who were lucky grew up in a reasonably nurturing environment, being told that if we worked hard enough, we could succeed at anything. But then, reality intruded. College happened. Life happened. Outsourcing and downsizing happened. Suddenly one day, we wake up to discover we're over halfway to retirement and still don't really like what we're doing or know how to fix that. That's a very, very bitter pill to swallow. You're left with frustration and disappointment because you feel like you were lied to as a child, but “big boys don't cry” so you do your best to suck it up. You go to the job you hate every day, listen to people talk about how this or that person is doing so well for themselves, deal with your clueless boss, or your nagging spouse, or your disapproving parents, or needy children, or if you're really unlucky, all of the above. This can generate a tremendous amount of self-loathing, resentment and anger, and is, I believe, the driver for all sorts of bad habits – drinking, drugs, road rage, spousal abuse, child abuse, depression, self abuse. You name it.
Due to the bad information you were fed as a child to try to motivate you to do better, you internalize it all. (Remember, if you work hard enough, you can accomplish anything.) It must be something wrong with you! It can't be that the system is rigged against you, or that you were fed a line of bullshit growing up, or that most companies would throw you under the bus for a higher profit margin as soon as look at you. YOU must be broken. You did it wrong, or didn't work quite hard enough, or didn't want it bad enough, yadda yadda yadda. It's YOUR fault that your life didn't turn out the way the fairytales they fed you as a child said it was supposed to! BUT... you're a MAN so you're not supposed to be uncertain or unhappy or need a little help or a shoulder to lean on. Suck it up, semper fi, remember the Alamo! What would your father/mother/grandfather/brother/pet poodle think of you if you admitted to being imperfect and maybe even feeling a little lost?!? It's just not done. So you march off to work every day like a good little soldier.
Until one day, something snaps. Maybe you get cut off in traffic one too many times. Or your boss whizzes all over your ideas again. Or your spouse points out that the neighbors are getting a swimming pool/new car/exotic vacation and what's wrong with you that you can't provide those things?? All of that anger and fear and sadness and frustration comes boiling up in a toxic mess that clouds your judgment and tints the world an angry shade of red. You respond in the only way you've ever known how to. You “act like a MAN”. You grab a knife or a gun or the car keys and you go show those people who doubted you how much of a MAN you are until there's no one left standing, or you're cut down by police or some other gun-toting Dirty Harry wannabe. And people say, “But he was such a nice man!” or “He was so quiet, you never would have known there was anything wrong!” and try to find some kind of sane explanation for what you did, based on the faulty information we were all given as kids. If they could talk to your 12-year-old self, he would tell them how betrayed and manipulated he felt. How all their well-meaning lies twisted him up inside until he couldn't take it anymore. How, maybe if they'd only have been honest and said, “Well, that job isn't for everybody,” or “Hey – you gave it a try, and you failed, but that's alright because we all fail.” Or “Okay – maybe you're not cut out to be a rocket scientist, but the world still needs carpenters and bricklayers and bakers and mailmen and a thousand other perfectly honorable, respectable professions to be filled. Maybe you should lower your sights a bit.” Or even just hugged you and let you cry on their shoulder until you felt better about screwing up. If they'd told you that real men do feel scared, and uncertain, and inadequate, and sometimes just plain lost. If they'd told you that to be a man, you don't have to be a combination of Rambo, Dirty Harry, and Superman. If they'd told you that whatever happened, you could always come and talk to them, and that they'd do their best to help, without expecting you to be anything other than yourself. Failure is an option. And that's okay.
If someone had asked me what I'd be doing a year ago, I would almost certainly not have said, "Building custom gong stands", but that's what I've been doing. Here are some pictures of the stands I've made. If you're interested in buying a gong or a stand, check out Gongs Unlimited's site.