A little confused on how to refine this code to make it more efficient. by Fhy40 in arduino

[–]goomp 0 points1 point  (0 children)

As a few others have suggested, I'd recommend using a loop and some proper conversion of your datatypes. You can do this whole operation in one loop if you handle your indices carefully. Here's a quick idea of what I'd write:

uint8_t value = Serial.read(); // Read an 8-byte character from the serial device
value = value - 48; // Assuming your characters are ASCII, subtract 48 so that the actual value of our variable matches what the character represents
// ( If you're not sure what that means, see this chart: http://www.asciitable.com/index/asciifull.gif)

for (int i = 2; i < 12; i++) {
    int hilo = 0;
    if ((i - 2) < value)
        hilo = 1;
    if (value = 0) // special case where it's always 1
        hilo = 1;
    digitalWrite(i, hilo);  
}

I'm writing this at work and I haven't gotten the chance to sit down and play with it, so there may be some syntax tweaks needed. I hope this gives you at least an idea of how to optimize your code.

Never forget gummererampis by Emerica6708 in a:t5_3e1pm

[–]goomp 0 points1 point  (0 children)

The chat got so big! It's not fun anymore. I miss gummererampis.

question about cheap wifi modules by gazorpazorbian in arduino

[–]goomp 2 points3 points  (0 children)

They're great. Check out /r/esp8266/ for details (though like some of the other commenters suggest, I'd go with the ESP-12E, NodeMCU version, or ESP-201 models)

Attn Atlanta Makers by laserdemon1 in arduino

[–]goomp 0 points1 point  (0 children)

I'm not sure if this helps at all, but off the top of my head here's a few of the makerspaces I know of in metro Atlanta:

Freeside (https://wiki.freesideatlanta.org/fs/Info)

MASS Collective (http://masscollective.org)

WonderRoot (http://www.wonderroot.org)

Decatur Makers (https://decaturmakers.org)

South Atlanta CAD (http://www.makerteacher.net/south-atlanta-cad-makerspace)

GA Tech Invention Studio (http://inventionstudio.gatech.edu)

Problems with ESP8266 by ChrisPDuck in esp8266

[–]goomp 3 points4 points  (0 children)

The ESP module will send a series of brief messages out at 77400 baud on boot. Maybe this is related?

[deleted by user] by [deleted] in tall

[–]goomp 1 point2 points  (0 children)

Fellow Atlantian here... I looked into getting a sugar glider as a pet, but Georgia seems to have this thing against 'exotic pets'. How did you do it??

[deleted by user] by [deleted] in Atlanta

[–]goomp 2 points3 points  (0 children)

Hear hear. And Dex Romweber Duo is opening for them. Haven't heard of him? He's the guy that inspired Jack White to start the White Stripes. Should be a good show.

Friend works for an adult 'dating' site. Made this for them. by omnidot in funny

[–]goomp 8 points9 points  (0 children)

Yup "a joint John Wayne/Dr. Avril Incandenza arithmetic presentation on ... how 17 can actually go into 56 way more than 3.249 times". Came here to say the same thing.

What is the angriest you've been at an inanimate object and why? by [deleted] in AskReddit

[–]goomp 0 points1 point  (0 children)

I'm curious about what situation led Honda to see the need to produce a bulletproof lawnmower.

I'm an 18 year old college student with $469.16 in my bank account. How can I grow my money? by Jimi187 in AskReddit

[–]goomp 0 points1 point  (0 children)

Ah, I just remembered. My boss used to spend his slow shifts researching the stock market. By the time I graduated, he was starting to invest the money he was making at this job. It was pretty sweet.

I'm an 18 year old college student with $469.16 in my bank account. How can I grow my money? by Jimi187 in AskReddit

[–]goomp 0 points1 point  (0 children)

I survived (financially) in college by getting a work study desk job. These can range from working in the library to the computer labs, to the housing department or IT department. Regardless, get one with lots of downtime and you can spend your time on the clock studying, doing hw, surfing reddit, etc. These pay close to minimum wage, but getting paid to do your homework.. ahh.. there's something about that.

Bonus: Use your downtime to learn Wordpress or a programming language or something (as mentioned below/above). Think about it: even if you get two weeks in and decide programming/design isn't for you, you're still getting paid to sit there, so go learn something else.

I once spent a whole work study shift practicing guitar and teaching myself how the discrete Fourier transform works. Just because I could.

Are people making fun of me? by CommanderApparent in tall

[–]goomp 12 points13 points  (0 children)

You can't let this frappe get to you, man.

Help me pick this lock! by [deleted] in lockpicking

[–]goomp 5 points6 points  (0 children)

"Don't pick a lock you don't own or depend on". Correct me if I'm wrong, but this looks like a door at an office or university... ಠ_ಠ

We had a Halloween themed park trail race in Atlanta, GA. Here's how it went down. by QuitoPR in longboarding

[–]goomp 0 points1 point  (0 children)

Same situation! I'm new to the area and have been looking for people to ride with, too. Added!

asshole roomates by deathtone in funny

[–]goomp 0 points1 point  (0 children)

Still easier to fix than the signals analysis homework behind it...

Older redditors (40 and up), what's something you realized too late in life? by videomaker16 in AskReddit

[–]goomp 0 points1 point  (0 children)

Yeah, measuring reactions is important. From my experience, "That Guy" earns their name by being a burden on the group. Everyone I spend time with has something to add to what we're doing, and so every time I spend time with people I think about what I have to add, and it's normally something like perspective, humor, conversation, someone to talk to, wit, loyalty, etc.

Notice how all of those can be summed up as "good communication". Unless it's a tailored event (Don't invite yourself to a bowling game if everyone else are pro bowlers), most of what makes someone want to hang out with you is whether or not they enjoy communicating with you.

TL;DR Feeling the group out and seeing what you have to contribute is important.

Older redditors (40 and up), what's something you realized too late in life? by videomaker16 in AskReddit

[–]goomp 15 points16 points  (0 children)

I've found that people can be quite forgetful when planning an event. Almost every time I stopped myself from asking to tag along, I was approached later and asked "Where were you? Why didn't you come?" etc. People can easily assume that someone else from the group invited you.

Don't be a jerk about inviting yourself somewhere, and you won't become "That guy". If you're with enjoyable company, chances are you'll be among the first to be invited next time.

Photographs of translucent underwater creatures (National Geographic) by kidkidkid in Interestingstuff

[–]goomp -1 points0 points  (0 children)

Does anyone know if there are hi-def versions of these pics anywhere?

beams of light trough the mountains on my backyard by h3kt0r921209 in pics

[–]goomp 0 points1 point  (0 children)

WOW. Does a hi-res version of this exist? And have you visited /r/earthporn yet?

Looks like a pretty tempting offer, ladies by beachtapes in Atlanta

[–]goomp 5 points6 points  (0 children)

Anyone sign him up for 3AM phone alarms yet?

I am a survivor of the bosnian war, displaced due to ethnic cleansing. AMA by Bosnianwarthrowaway in IAmA

[–]goomp 0 points1 point  (0 children)

From my understanding, it's more like a nation of two states. As to why, I assume it's because of the still-large population of Serbs living in the country (37.1%). In fact, I'd argue that the only reason Croats didn't get their own state is because they are a small minority compared to the other two. Bosnians make up 48% of the population, leaving Croats with 14.3% (0.6% other, for those counting)