User Controls

Anyone here experienced with Arduino, or at least electronic circuitry more generally?

  1. #81
    gadzooks Dark Matter [keratinize my mild-tasting blossoming]
    Originally posted by tee hee hee Are the uninvited still coming around? Maybe youre doing all this for nothin…

    Yeah, but less and less.

    The two security cams in the back, the chiming and other sounds that go off when anyone comes too close, etc, are all having an impact (tweakers, schizos, and criminals are all scared of cameras... And if they fall into more than one of the aforementioned categories, there is a compounding effect).

    Also, I've been saying "no" more and more when I get phone calls or buzzes at my door.

    That being said, the buzzes at the front door are still an absolute nuisance. I need a way to intercept them, and even silence them altogether.

    I hate living in an old ass building without fancy video intercom and all that. I can't know who it is until I pick up the intercom handset.
    The following users say it would be alright if the author of this post didn't die in a fire!
  2. #82
    gadzooks Dark Matter [keratinize my mild-tasting blossoming]
    Oh, and the project is intrinsically enjoyable and highly educational as well.

    So I'm doing it no matter what.
    The following users say it would be alright if the author of this post didn't die in a fire!
  3. #83
    gadzooks Dark Matter [keratinize my mild-tasting blossoming]
    AN UPDATE ON CURRENT PROJECT STATUS...

    So, I have been working on this whole thing in bits and pieces here and there, but the major rate limiting step was procuring all the supplies I would need. I've got like 95% of what I need, so I've started doing some really basic RPi GPIO wiring to get a feel for it. Aside from setting up an Arduino to light an LED (well over a year ago), I have essentially zero direct experience with this kind of stuff.

    Today, I set up a fresh install of Raspbian on one of my Raspberry Pi's, and set up the "hello world" of electronics projects, a (python-controlled) LED.





    I'm actually pretty giddy and excited over this because, like I said, it's all kinda new to me, so it's a confidence-bolstering sanity check to see the LED actually light up when I program it to.

    The next step is to play around with the USB sound adapter I got for this.

    I also have a couple different relay switches to experiment with.

    But before I start tampering too much with the intercom's built in wires, I want to get one last thing: Some alliGAYtor clips. That way, instead of soldering and so on, I can essentially switch things back to the way they were originally if things go terribly, terribly awry.

    I will update this thread when I've made some more substantial progress.
    The following users say it would be alright if the author of this post didn't die in a fire!
  4. #84
    gadzooks Dark Matter [keratinize my mild-tasting blossoming]
    Originally posted by gadzooks alliGAYtor clips

    lol
  5. #85
    hydromorphone victim of incest [insincerely conduce my paisley]
    Originally posted by snab_snib you're not going to do shit because you have a mental illness. stop doing meth or whatever it is that you're doing. leave the fucking intercom alone. you're a complete fucking idiot and have no business messing with electric devices. if you were smart you'd just wire it to a fucking jack and plug it into your computers mic in. but you're not smart, you just like to pretend that you are, but since you aren't, anything you do under the assumption that you are smart will fail completely. start living under the assumption that you're a fuckin idiot and you'll get better results

    Dpnt listen to this faggot. I think what you're doing is cool and I want to see you succeed. However, I dont have any advice for you... I wanna learn too.
    The following users say it would be alright if the author of this post didn't die in a fire!
  6. #86
    We'reAllBrownNosers African Astronaut
    Originally posted by hydromorphone Dpnt listen to this faggot. I think what you're doing is cool and I want to see you succeed. However, I dont have any advice for you… I wanna learn too.

    That's a great idea for a homeless person. Electronic components are cheap especially in bulk and easy to put together. You can make a good deal of money selling things you've made. Or if you get pissed off enough, make bombs and kill everybody.
  7. #87
    We'reAllBrownNosers African Astronaut
    Originally posted by gadzooks Who is that motherfucker?

    It's just me, I'm secretly a gay tranny. I was only trolling you with my other account cause I got bored. Sorry.
    The following users say it would be alright if the author of this post didn't die in a fire!
  8. #88
    gadzooks Dark Matter [keratinize my mild-tasting blossoming]
    ANOTHER UPDATE:

    Holy fuck this project is becoming unwieldy... And not even because of scope creep. Scope creep is a problem that plagues me every day when it comes to programming/software projects. I keep wanting to add new features and then get sidetracked.

    But here, it's simply that I vastly underestimated how much work it would take just to get the original set of features up and running.

    But here's where I'm currently at:

    1. Audio (HARDWARE):

    I had a stereo headset (mic and headphones, rolled into one - with two STEREO audio connectors). I plugged the mic (AUDIO IN) and earphones (AUDIO OUT) into the USB sound processor mentioned above, and plugged that USB sound processor into my WINDOWS laptop (for testing). It worked there at least.

    Next, I started stripping the wires with the intent of reconnecting them via either (a) alligaytor clips, (b) breadboard jumper wires, or even (c) soldering. Because they're stereo, though, it's a lot of different parts to reconnect - three for the earphones; two for the mic.

    So, I went to the dollar store to try and find some cheap mono earphones and mono microphone. I managed to find a mono microphone (maybe they're by their very concept universally mono? I dunno). But I could not find ANY mono audio gadgetry otherwise. So, I'm still experimenting with all of that.

    2. Audio (SOFTWARE):

    I got some socket interaction working between my RPi and my Windows desktop computer. I can now at least transmit messages easily between the two. This is a pretty wide-reaching accomplishment actually, because once you can successfully exchange "messages" of any kind (even just 1's and 0's) between two machines on the network, you have the foundation to exchange MUCH more complex "messages" - including, say, streaming audio (in the form of bytes, which can be converted back into meaningful audio signals on the other end, etc).

    I'm currently exploring different options for serving streaming audio from the RPi. There are lots of options, so I'm confident here. It's now just a matter of picking the right one.

    Audio processing, though, on the software end, is going to be an additional layer of complexity... My goal is to process the audio solely on the RPi end, and then stream it as bytes, which don't require complex audio processing on whatever device is receiving the stream.

    3. Relay switching:

    I'm still working out the whole power issue regarding a 12V signal, when the RPi works on 5V. This may be a simple matter for the more electronically inclined, but for me it's going to take a bit more research and theoretical understanding - especially because it involves electrical signals. I don't want to short circuit anything, or, potentially much worse, receive some kind of electric shock while mucking around with things here.
  9. #89
    aldra JIDF Controlled Opposition
    1. You can use a stereo connector, you just need to solder the audio wire to both the LEFT and RIGHT pins. this link might help - the only difference between the two is that a stereo connector has one extra segment cut into it:


    2. TCP you mean?

    3. It's not hard to do but it might be hard to get your head around if you haven't dealt with it before. Think of the relay as a door in a 12v hallway. You need 5v to open the door and let the 12v through - the 5v ONLY goes to the door, it does not cross over into the hallway at all.
    The following users say it would be alright if the author of this post didn't die in a fire!
  10. #90
    gadzooks Dark Matter [keratinize my mild-tasting blossoming]
    Originally posted by aldra 1. You can use a stereo connector, you just need to solder the audio wire to both the LEFT and RIGHT pins. this link might help - the only difference between the two is that a stereo connector has one extra segment cut into it:

    Theoretically, I get this part. But once you strip the insulation of the wire, shit just gets way too tiny.

    I actually bought a neat little contraption on Amazon that holds magnifying glasses of varying strength, as well as little clips for holding things in place - I think it's made primarily for soldering and all that, but it'll probably help quite a bit with whatever I'm doing here.

    I was hoping for some mono cables to play around with though because, if I understand how the whole TRRS/TRS/TS audio cable system works, TS (mono) would be just one simple wire to deal with for MIC IN and another for AUDIO OUT. It would just make things easier.

    That, or I just need to get used to dealing with such incredibly small components.

    Originally posted by aldra 2. TCP you mean?

    Yeah. Python has a built in "socket" library which allows for sustained connections.

    I could have used HTTP, or even MQTT (which is essentially socket communication as well), or any number of protocols.

    The whole point is just that there will be two different types of messages being exchanged, and each can use a different protocol... Or both the same protocol I suppose.

    I need to be able to transmit a binary signal/trigger from the RPi to the rest of my network when the buzzer is activated from the front of the building. I then need to transmit a similar (identical, really) signal/trigger back to the RPi to "answer" the buzzer/call. At this point, the audio IN and audio OUT would have to start interacting.

    Come to think of it, I'm now almost certain that a direct and constant socket interaction would have to be initiated. Skype and so on are based on that kind of communication.

    HTTP simply wouldn't cut it.

    But anyway, that was mostly just some thinking out loud.

    You're right that it all comes down to TCP in the end.

    Originally posted by aldra 3. It's not hard to do but it might be hard to get your head around if you haven't dealt with it before. Think of the relay as a door in a 12v hallway. You need 5v to open the door and let the 12v through - the 5v ONLY goes to the door, it does not cross over into the hallway at all.

    I like the analogy.

    Does it mean that I need to provide a constant source of 7v, though, which would be insufficient to unlock the door on it's own, but when provided with the 5v push, it would unlock it?

    Does that question even make sense? Maybe not...

    Also, 7v seems weird. I see 5v, 6v, 9v, and 12v all over the place...

    Then again, a single AA battery is 1.5v, I think?

    I dunno, it's just gonna take some looking into for me.
  11. #91
    We'reAllBrownNosers African Astronaut
    Seems like you'd have an easier time doing this with assembly rather than python.
  12. #92
    gadzooks Dark Matter [keratinize my mild-tasting blossoming]
    Originally posted by We'reAllBrownNosers Seems like you'd have an easier time doing this with assembly rather than python.

    You can always access lower level devices with python.

    I've dabbled (ever so briefly) with assembly before, and, unless it's simply for personal intellectual curiosity, I would never recommend it as a practical solution (for anything).

    Python has wrappers, whether built-in or third-party modules, that handle just about any I/O interactivity, including all GPIO functions.
  13. #93
    aldra JIDF Controlled Opposition
    Originally posted by We'reAllBrownNosers Seems like you'd have an easier time doing this with assembly rather than python.

    lol wut

    Originally posted by gadzooks I like the analogy.

    Does it mean that I need to provide a constant source of 7v, though, which would be insufficient to unlock the door on it's own, but when provided with the 5v push, it would unlock it?

    No. Forget about the 12v for now. The way the door (relay) works, specifically, is that it needs 5v to operate. Once it has its 5v you just need to send it a signal to open and close.

    The 12v is what walks through the door, it has no relation to how the door works or how much power it requires to operate. the 5v and 12v never meet and you don't need to make them match each other in any way.
  14. #94
    aldra JIDF Controlled Opposition
    and yeah, soldering 2.5" stereo sockets can be a bitch even if you're decent at soldering. Good luck with that lol
  15. #95
    aldra JIDF Controlled Opposition
    assembler is only really good for low-level performance intensive code like raw math or crypto calculation. outside of that it takes way too long to get anything done
  16. #96
    We'reAllBrownNosers African Astronaut
    Originally posted by aldra assembler is only really good for low-level performance intensive code like raw math or crypto calculation. outside of that it takes way too long to get anything done

    Assembly is good for everything if you're good at it, and doesn't have to be time consuming. Too much abstraction with higher level languages. Rather than going and seeking someone else's library, you'd have already created your own. That's if you're good at it, which most people never will be. But if I was messing with random hardware that's what I'd probably go for.

    That's kinda why lifejunkie would recommend people learn assembly before learning a higher level language first, because you'll understand the hardware better that way. The reverse is more difficult but still possible.
  17. #97
    gadzooks Dark Matter [keratinize my mild-tasting blossoming]
    Originally posted by We'reAllBrownNosers That's kinda why lifejunkie would recommend people learn assembly before learning a higher level language first, because you'll understand the hardware better that way. The reverse is more difficult but still possible.

    I'm actually ALL for this. Learning (at least the basics of) assembly helped me make huge strides in understanding how things work "under the hood."

    Originally posted by We'reAllBrownNosers Assembly is good for everything if you're good at it, and doesn't have to be time consuming. Too much abstraction with higher level languages. Rather than going and seeking someone else's library, you'd have already created your own.

    I used to do that kind of thing all the damn time.

    They call it reinventing the wheel, and it's a phase pretty much every aspiring software developer goes through at some point.

    It actually took me years just to train myself not to engage in that type of activity.

    In fact, the whole intercom project this thread happens to be about... I'm now realizing that, if I actually tally up all the hours of labor and effort I have devoted to both planning and experimenting and actually implementing various parts of it, and then added on what I spend on supplies and tools and so on... LOL. I'd have saved a damn fortune if I just paid someone to do it for me, or forked out like $1,000 on some minimal assembly required intercom kit online.

    So yeah, come to think of it, I guess I'm actually still guilty of pathological DIYism and wheel reinvention.
  18. #98
    aldra JIDF Controlled Opposition
    Originally posted by We'reAllBrownNosers Assembly is good for everything if you're good at it, and doesn't have to be time consuming. Too much abstraction with higher level languages. Rather than going and seeking someone else's library, you'd have already created your own. That's if you're good at it, which most people never will be. But if I was messing with random hardware that's what I'd probably go for.

    lol, you've never actually written any assembler have you.
  19. #99
    Star Trek VI: The Undiscovered Country Dark Matter [my scoffingly uncritical tinning]
    Don't even try to learn assembly you fucking autistes, and who the fuck cares exactly how a microprocessor works. Its not like you're soldering your own computers together like it was the 70s.

    Assembly is a high level language now anyway, at least on modern x86/AMD64 platforms, which optimise the shit out of code.
  20. aldra JIDF Controlled Opposition
    high and low level are relative, unless you want to write raw machine code you can't get much lower than asm.

    as for optimisation it depends on the assembler - masm and some others implement macros and shit, they're not so much assembler as extensions to it thjough
Jump to Top