|
OK I think that makes sense
|
# ? Jul 12, 2014 02:59 |
|
|
# ? May 31, 2024 10:36 |
Economic Sinkhole posted:My dog bark detector/counter project is fairly successful so far, including tweeting the barks. https://twitter.com/barkbarkbarkb I ended up using an Uno and monitoring the voltage on the LED using an analog pin. The Pi runs a python script that continually monitors the serial connection and tweets when the detector hears a bark. I am thinking about trying to add audio recording in to the mix somehow, so I can confirm that it is actual barks that are setting the detector off and not other noises. That thing is sexy and you are a sexy goon for making it. I am very interested in hearing more about the power arrangement on that project - I wasn't sure if you were going to have to go with batteries or something equally terrible because the unit was outside. What did you end up settling on?
|
|
# ? Jul 12, 2014 03:32 |
|
Sagebrush posted:finger-detection brake that works on capacitive principles. The shop where I work has these at almost every spot where we need a saw. I've tripped one myself, and barely had a scratch. Bought an Arudino Micro today. I'm looking forward to doing some basic keyboard emulation soon.
|
# ? Jul 12, 2014 04:09 |
|
Delta-Wye posted:That thing is sexy and you are a sexy goon for making it. I am very interested in hearing more about the power arrangement on that project - I wasn't sure if you were going to have to go with batteries or something equally terrible because the unit was outside. What did you end up settling on? Haha thanks. I ended up running an extension cord out to the tree to power the Pi. The Uno is running off the USB on the Pi. Not a great long term solution but I don't imagine this is a long term project. Pics if you want them The Uno actually fits inside the bark deterrent. I cut a slot for the USB cable. Sophisticated waterproofing system
|
# ? Jul 12, 2014 04:23 |
|
If you're looking for something a bit easier you can get liquid electrical tape at most hardware stores. I've been using it with shrink tube to waterproof some submerged splices and it works very well. You just paint it on and give it an hour or so to dry and harden.
|
# ? Jul 12, 2014 20:24 |
|
I'm not having much luck with getting my arduino micro to wake up from sleep mode. I want to put my Arduino Micro into SLEEP_MODE_PWR_DOWN until pin 2 goes from low to high (RISING interrupt). In the sketch below it all works as expected. The interrupt triggers when pin2 goes high and prints my string, so I know the interrupt works. But when I uncommented the sleep_mode() line my device goes to sleep and doesn't wake up. Now I can't even reprogram it via USB since it goes to sleep immediately, so I think I hosed up. I hope I can recover the arduino micro by using my Uno as a ISP to re-flash it but I've never done that before. Does anyone have experience with sleep modes and waking with external interrupts who can tell me what dumb thing I am clearly doing? I'm not a new programmer, but I'm very new to electronics and this is my first real project. code:
|
# ? Jul 13, 2014 06:03 |
|
I've not done sleep mode recently, but the arduino docs seem to say you want to use attachInterrupt(0... instead of 1 for using pin 2 as the interrupt pin. 1 should map to pin 3.
|
# ? Jul 13, 2014 18:20 |
|
TVarmy posted:I've not done sleep mode recently, but the arduino docs seem to say you want to use attachInterrupt(0... instead of 1 for using pin 2 as the interrupt pin. 1 should map to pin 3. That's true for an Uno, but I'm using a micro. I couldn't find clear docs for interrupts on a Micro, but I did find mention that it should be the same as a Leonardo. On a Leonardo pin 2 is on int.1.. Plus like I said, when I don't use sleep_mode() I do get the interrupt to fire correctly with the code I posted. Serial.print does send "wakeNow interrupt triggered" when pin 2 goes from low to high. So I feel like I'm using attachInterrupt correctly, but this is also the first time I'm using interrupts so I may be wrong.
|
# ? Jul 13, 2014 19:37 |
|
It's a better practice to put the attachInterupt in the setup. I'm not sure why you're detaching it later, but you can turn them on/off with Interrupts() and noInterrupts(). You also shouldn't be using a serial command inside of your interrupt: You want the code in your interrupts to be as short and fast as possible. Having the serial command in front of the sleep_disable() is probably causing the problem as the serial command likely won't complete until the board wakes up. This page also seems to suggest that LOW is the only valid interrupt type while powered down, which means you'll need a pull up.
|
# ? Jul 14, 2014 01:25 |
|
TheLastManStanding posted:It's a better practice to put the attachInterupt in the setup. I'm not sure why you're detaching it later, but you can turn them on/off with Interrupts() and noInterrupts(). You also shouldn't be using a serial command inside of your interrupt: You want the code in your interrupts to be as short and fast as possible. Having the serial command in front of the sleep_disable() is probably causing the problem as the serial command likely won't complete until the board wakes up. This page also seems to suggest that LOW is the only valid interrupt type while powered down, which means you'll need a pull up. Thanks! I was putting detach in the interrupt to keep it from firing again after the device woke up. Once I get the Micro working again I'll try it with just sleep_disable() in the interrupt function, and noInterrupts() where the main sequence resumes after waking up. I had read that page you linked but missed the part about only LOW working when the device is asleep. That's a bummer. I had actually already gotten a PCB assembled and everything was working great, except I realized that the final power consumption was too high. I started looking into the sleep mode stuff at that point. Looks like I'll need to get a new board after I finish re-prototying with sleep mode stuff working.
|
# ? Jul 14, 2014 05:06 |
|
Not sure if this is the right thread for this, but I'm putting together a board that is going to use an ATMega32u4 (aka leonardo) and I want it to completely ignore the power from the USB and only use external power as I'm going to be using a nice regulated power supply for it and other things. If my understanding is right, all I should need to do is tie UVCC to the other +5 V pins with the power supply. Then I can take the +5 V from the USB and have it only go to VBUS. Anyone know if this is correct?
Woolwich Bagnet fucked around with this message at 06:41 on Jul 22, 2014 |
# ? Jul 22, 2014 06:39 |
|
I'm working on a project that uses one moteino (arduino clone with RF module) to communicate with another via RF in order to turn on/off a servo. The gateway moteino will be wired to a switch that, when thrown, transmits a 1 instead of 0, instructing a node moteino to turn on or off a servo, accordingly. I changed the program so that the two numbers being sent are 2 and 3, and commented out the servo lines (for troubleshooting). I can still monitor the data being sent from the "gateway" moteino and confirm that '2' and '3' are being sent. Monitoring the output log of the receiving moteino, i get: code:
When the switch is off, the receiving moteino gets the "2" and outputs "invalid," which is fine--however, when the switch is on, it just repeats with no signal. The output from the gateway moteino is as follows: code:
I've attached the code of the programs below as well. Any idea on what may be wrong? I've posted in the moteino forums but figured I'd try here as well. Gateway: code:
code:
|
# ? Jul 23, 2014 21:03 |
|
Mr. Bubbles posted:As you can see, it seems to be sending a '2' or '3' without issue. So I guess the issue is on the receiving end? If you hold the send button for a long time, does the receiver still pick up 2s? When you watch the serial output, is the sender sending every 2 seconds, and is the receiver receiving every packet?
|
# ? Jul 24, 2014 06:01 |
|
Problem solved: something was wrong with the pin #2 on my moteino; switched to a different pin and it works fine.
Mr. Bubbles fucked around with this message at 01:31 on Jul 27, 2014 |
# ? Jul 26, 2014 01:12 |
|
Okay, so here's a really, really frustrating issue I've come across. My desktop is a 64-bit machine, while my notebook is a 32-bit machine. Same OS, same versions of Arduino, same everything except for the bitness. I'm working with the IRremote library. Even with example code, such as the IRrecvDemo, when compiled on the 64-bit machine, I get gibberish results from the IR remote - just "FFFFFFFF" results all the time. If I take the exact same code, and compile it on the 32-bit machine, it works properly, and I get the correct results. Note: in both cases the code runs without errors, it's just having an issue parsing the incoming data. I've done everything I can think of - I replaced all the looser-types (int, long) in the library with the stdint.h versions (int16_t, int32_t, uint32_t, etc). No change. It compiles, runs, and reports gibberish. I'll post code if you want - but since I'm working with examples included with the library, I think it's a moot point. Side note: I'm using a Teensy 3.1, but as it's pretty much code-compatible, it shouldn't make a difference.
|
# ? Aug 6, 2014 22:19 |
|
The host/computer processor shouldn't matter since Arduino's IDE (and the changes to it to support the Teensy) pack in their own copy of the avr-gcc or other gcc compiler suite. The size of int, long, etc. will be exactly the same in your Arduino code because it's targeting the same processor (the Teensy board). I would do a fresh reinstall of the Arduino and Teensy IDE on the machine that isn't working. Gut everything already installed and install it in a new place just to be sure.
|
# ? Aug 6, 2014 22:23 |
|
I've actually done that. Multiple times. And sizeof(int) on the 64-bit machine is 4, as is sizeof(long) On the 32-bit machine, it's 2 and 4 respectively. Edit: I just figured out what it was. 64-bit machine - the Teensy was set to 72mhz. 32-bit was set to 96 (overclock). Switch the 64-bit machine to the 96mhz setting, and bam, it works. TwystNeko fucked around with this message at 22:39 on Aug 6, 2014 |
# ? Aug 6, 2014 22:33 |
|
TwystNeko posted:And sizeof(int) on the 64-bit machine is 4, as is sizeof(long) Sure, for code that's compiled to run on the 64-bit or 32-bit machine you should see those values. For code that's compiled to run on the Teensy sizeof(int) and sizeof(long) should never change regardless of the Arduino IDE running on a 64-bit or 32-bit computer. The Teensy's ARM processor only supports 32-bit so there's really no way for your 64-bit machine to influence the code generated for it.
|
# ? Aug 6, 2014 23:06 |
|
I'm attempting to make an internet-connected analog weather station using my Arduino Yun and an antique I got off of eBay. I want it to show the current weather conditions of my favorite places. I think the finished product is going to be really cool, but I'm not sure how to handle controlling the temperature, barometer, and humidity gauges. I was planning to attach the indicator arms to individual stepper motors to dial in the correct numbers. Is that the best hardware solution to this? Also, I'm not sure how to handle what happens when the Arduino is powered down. Like if it's on 89 when it's powered down. When it powers back up and reloads the sketch, I need it to remember that it was last on 89, so on the next update from the Weather API, I can move the stepper motors forward or backward X steps to get to the correct current temperature, humidity, & barometer reading. I guess the the program could write the current dial readings to disk on every weather update so it remembers the last temperature reading. Is that the best way to handle this?
|
# ? Aug 7, 2014 01:01 |
|
It's bad practice to assume the stored position is correct since unexpected power failures could make that number unreliable. If you use a servo instead of a stepper motor it will always know its position. Second option is to have something (like a contact or switch) which can be used as a home position that can be referenced on startup. Third option (and probably the best) would be to replace them with a galvanometer. TheLastManStanding fucked around with this message at 01:50 on Aug 7, 2014 |
# ? Aug 7, 2014 01:47 |
|
I'd probably use hobby servos instead. No need to remember last position, which would simplify your program a bit. Or you could also have an end stop switch.
|
# ? Aug 7, 2014 02:16 |
|
If you want sample code and guides, amp meters hooked up to a pwm pin seem to be the most common solution to making an arduino dashboard. But I like the servo idea better. It probably comes down to whatever is easier to attach to the existing meters.
|
# ? Aug 7, 2014 18:07 |
|
I'm new to all this, so I wasn't even aware what a servo was or how it works - which I do now thanks to SA & YouTube. Thanks for the tips. I'm getting a few servos, one with full rotation to handle the barometer. I'm not sure how best to attach the needles (glue?), but I guess I'll figure that out when the servos arrive.
|
# ? Aug 8, 2014 17:50 |
|
plasticbugs posted:I'm not sure how best to attach the needles (glue?), but I guess I'll figure that out when the servos arrive. Here: http://www.thistothat.com/
|
# ? Aug 8, 2014 17:51 |
|
plasticbugs posted:I'm new to all this, so I wasn't even aware what a servo was or how it works - which I do now thanks to SA & YouTube. Thanks for the tips. I'm getting a few servos, one with full rotation to handle the barometer. I'm not sure how best to attach the needles (glue?), but I guess I'll figure that out when the servos arrive. Is the full rotation one continuous rotation servo? I've not seen that term before, and googleing it only shows it at sparkfun for a continuous rotation servo. Either way, continuous rotation servos just let you set an approximate speed to spin at. They don't let you set a position to go to, so you'd have to remember or sense the position yourself, like you would with a stepper. And since they aren't granular like a stepper motor you'd have even more of a difficult time setting a precise position. If you're not certain give a link. Also, I'm not sure why the barometer needs to spin any more than any of the other gauges. Your picture only shows it with a bit more range of motion than the other dials. A typical servo goes over 160-180 degrees which could cover almost all of the range. If you need more look for winch servos that do 1 to 3.5 turns with position control.
|
# ? Aug 8, 2014 18:16 |
|
EDIT for another question: What would you guys suggest I use to couple a hobby servo to a very thin, non-standard post (something like a needle)? The issue I'm having is that epoxying a thin needle into the exact center of the servo gear is very messy and imprecise. I looked into servo couplers, but there's nothing that would allow me to clamp down on a thin needle like a chuck of a drill clamps down on a bit. Is there something like that out there? At this point, I'm considering using a small blob of Sugru and eyeballing the placement of the needle. Aurium posted:Is the full rotation one continuous rotation servo? I've not seen that term before, and googleing it only shows it at sparkfun for a continuous rotation servo. Either way, continuous rotation servos just let you set an approximate speed to spin at. They don't let you set a position to go to, so you'd have to remember or sense the position yourself, like you would with a stepper. And since they aren't granular like a stepper motor you'd have even more of a difficult time setting a precise position. If you're not certain give a link. You're right. It is a continuous rotation servo, so I guess it won't do what I need for this project. It would be nice to have the barometer and temperature dials move through the full range - for extreme weather, but I can accept some loss on either ends. I'll look for a winch servo. Thanks for the tip! TheLastManStanding posted:It's bad practice to assume the stored position is correct since unexpected power failures could make that number unreliable. It's funny you mention the galvanometer. The Wind Speed and Wind Direction indicators on the left side of my barometer thingy are actually galvanometers (though I didn't know that's what they were called until your post). When I got the weather station, I knew it was missing an external powered weather vane - which I didn't need anyway. So I got it pretty cheap. I was hoping the entire thing was controlled through the external weather vane so I could just hook the thing up and start programming. But it turns out that the temp, humidity and barometer gauges were all controlled mechanically with little coiled bits of metal. I experimented with sending voltage to the wires that connect to the wind indicators and was able to pin the needles with the output from the Arduino's digital out pins. Through trial and error, I found that each indicator has its own ground wire. Then, I experimented with resistors and found a solution (10K resistor) that worked for each dial. So I'm able to programmatically dial in wind speed and wind direction from the Arudino. This is awesome. Thanks! plasticbugs fucked around with this message at 03:58 on Aug 13, 2014 |
# ? Aug 9, 2014 02:06 |
|
So, I'm pretty crap at coding. I found an example sketch of what I'm trying to accomplish here: http://playground.arduino.cc/Learning/PhotoResistor However I need the exact opposite behavior, aka when the photo resistor has a high value (lot of light) the LED is also bright. Each time I try to modify the code it doesn't work
|
# ? Aug 18, 2014 16:21 |
Old:code:
code:
For example: say we get "12" after reading and scaling. The first version just writes 12. The second version writes 255-12, or 243. Another example: say we read 255 after scaling. The first version writes 255, the second version writes 0. Third example: say we read 0 after scaling. First version writes 0, second version writes 255. Bad Munki fucked around with this message at 16:34 on Aug 18, 2014 |
|
# ? Aug 18, 2014 16:31 |
|
Bad Munki posted:Old: So with the help of this awesome goon here, we (read: he) was able to get this pretty smoothed out and working with adjustable values! code:
|
# ? Aug 18, 2014 21:07 |
|
I'm answering my own question from above here because someone might get some use out it. I found out what I needed to couple a servo gear to a very thin (< 2mm) post. I got this and it's exactly what I needed.
|
# ? Aug 20, 2014 05:53 |
|
So my latest project is a 32x32 RGB MatrixClock. One of the things I'm working on is a STL file parser, to show spinning 3D models. Simple ones, of course. The controller is a Teensy 3.1, so it's probably fast enough. I have very janky code that does a cube / octahedron, but I'm not at all happy with it. You can see it in my GitHub here. So far, on the parser front, I have the STL file being read in - I'm using the Binary format, as it's pretty easy to read. I just wonder if there's an easier way to handle the 3D transforms and projection than a bunch of for loops. Ultimately, I'm going to implement backface culling - which is pretty simple, just ignore the faces that are pointing away. Anyone worked with 3D stuff?
|
# ? Aug 22, 2014 19:10 |
|
Has anyone tried to build this arduino sous vide? https://learn.adafruit.com/sous-vide-powered-by-arduino-the-sous-viduino/sous-vide Im a bit confused on what exactly to load onto the uno. I loaded the helloworld file from Adafruit_RGBLCDShield but I cannot load the actual Sous_viduino, I'm getting an error: In file included from Sous_Viduino.ino:21: Sous_Viduino:62: error: 'PID' does not name a type Sous_Viduino:79: error: 'PID_ATune' does not name a type Sous_Viduino:125: error: 'OneWire' does not name a type Sous_Viduino:128: error: 'oneWire' was not declared in this scope Sous_Viduino.ino: In function 'void setup()': Sous_Viduino:178: error: 'myPID' was not declared in this scope Sous_Viduino.ino: In function 'void Off()': Sous_Viduino:246: error: 'myPID' was not declared in this scope Sous_Viduino:246: error: 'MANUAL' was not declared in this scope Sous_Viduino:262: error: 'AUTOMATIC' was not declared in this scope Sous_Viduino.ino: In function 'void Run()': Sous_Viduino:497: error: 'myPID' was not declared in this scope Sous_Viduino.ino: In function 'void DoControl()': Sous_Viduino:573: error: 'aTune' was not declared in this scope Sous_Viduino:580: error: 'myPID' was not declared in this scope Sous_Viduino.ino: In function 'void StartAutoTune()': Sous_Viduino:639: error: 'myPID' was not declared in this scope Sous_Viduino:642: error: 'aTune' was not declared in this scope Sous_Viduino.ino: In function 'void FinishAutoTune()': Sous_Viduino:656: error: 'aTune' was not declared in this scope Sous_Viduino:661: error: 'myPID' was not declared in this scope Any ideas? madkapitolist fucked around with this message at 04:43 on Aug 25, 2014 |
# ? Aug 25, 2014 04:34 |
|
I think you're missing the libraries it needs? Here's a list from the source code: code:
Instructions on adding Arduino libraries. Basically, if the file is a zip, you can just import it from the Arduino interface, and if it's not in a zip or you've unzipped it yourself, you can drag it into the right directory inside the Arduino directory.
|
# ? Aug 25, 2014 04:49 |
|
Hey thanks I just figured it out. I re-named some folders of libraries and the code didn't follow. I reverted and everything is working now. Making delicious sous vide eggs now! http://imgur.com/a/R2FpQ
|
# ? Aug 25, 2014 05:42 |
|
I've always been interested in the idea of making a project with an arduino or similiar but never had a need to until now, and I'm hoping I can get some advice from some knowledgeable folk. I was recently given an old stereo amplifier (proceed AMP3) and have quickly grown tired of the fact that, if left turned on, it functions as a 150+watt heater. The only way the thing was designed to be remotely controlled was VIA their branded preamps. Luckily their manual details precisely the signal format its looking for: REMOTE TURN-ON JACK A 1⁄8" “mini” jack above the AC mains receptacle on the rear panel allows remote-controlled turn-on (that is, toggling between operate and standby) of the Proceed AMP. This remote “trigger” will be operated by a 3–12 volts DC positive-polarity pulse, of at least 100 milliseconds dura- tion, with tip polarity as shown below: I don't have much electrical engineering experience, however I am confident in my scripting. My current plan would be to buy a basic arduino unit, leave it permanently connected to my windows 7 media PC, and use a script to trigger the arduino to send the power signal. Would anyone mind chiming in to tell me if an arduino is the best way of accomplishing this? The main thing that gives me hesitation is the specification for "DC positive-polarity pulse". Thanks!
|
# ? Sep 8, 2014 05:45 |
|
Full Circle posted:
It looks it could work very well. Don't forget to add a resistor to limit the current or else you could burn your arduino. The arduino works with 5V signals, so it is completely within specs. E: for extra geek points, you could consider adding a wifi shield to the arduino so you can control it from other devices in your network.
|
# ? Sep 8, 2014 14:19 |
|
Full Circle posted:The main thing that gives me hesitation is the specification for "DC positive-polarity pulse". Amberskin posted:It looks it could work very well. Don't forget to add a resistor to limit the current or else you could burn your arduino. quote:E: for extra geek points, you could consider adding a wifi shield to the arduino so you can control it from other devices in your network.
|
# ? Sep 11, 2014 19:28 |
|
Thanks guys, I placed an order on Sparkfun for an arduino + relevant parts a few days ago, everything should arrive tomorrow.
|
# ? Sep 11, 2014 21:13 |
|
I've got one of those 4x4 matrix keypads and it's nice but it eats up 8 digital pins. Would it be possible to use a shift register to send that data down to the arduino onto just the 3 or so pins it needs total? Similarly could a shift register be used to reduce the number of pins needed for operating a little LCD? For that matter if anyone has a good link on explaining how the shift registers work in code and such that would be super awesome.
|
# ? Sep 12, 2014 06:09 |
|
|
# ? May 31, 2024 10:36 |
|
Parts Kit posted:
There are a lot of examples in the internetz. For output you will probably want to use a 74HC595 or similar: https://learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds/the-74hc595-shift-register If you want to multiplex inputs, you will probably want to use a digital multiplexer like the 74HC151. http://playground.arduino.cc/Code/MUX151
|
# ? Sep 12, 2014 13:00 |