Show Posts
Pages: [1] 2 3 ... 7
1  Using Arduino / Programming Questions / Re: IRemote sending and receiving in the same sketch - problem on: November 13, 2013, 10:54:50 am
Arfuino 1.0 changed a bunch of things. Undoubtly there are a number of problems with all my old stuff.
2  Using Arduino / Programming Questions / Re: IRemote sending and receiving in the same sketch - problem on: November 13, 2013, 07:57:17 am
Perhaps you need to call enableIRIn() again after sending.

This man has it right (as usual).

Call enableIRIn() straight after the send and before the resume(). That should do it. I haven't played with an arduino for a long time, but I understand the library is a little out of date (#include <Arduino.h>). I will see if I can update them some time.

Here is an example from my own code:
#include <IRremote.h>
#include "STVDecCode.h"
#include "ONKYO605DecCode.h"
#include "FakeMCEDec.h"

int RECV_PIN = 8;

IRrecv irrecv(RECV_PIN);
IRsend irsend;
decode_results results;

int STATUS_PIN = 13;
unsigned long codeValue; // The code value if not raw

void setup()
  irrecv.enableIRIn(); // Start the receiver

void loop()
  if (irrecv.decode(&results)){
    Serial.println(results.value, DEC);
    codeValue = results.value;
    //VOL UP
    if (codeValue == STV_VOL_UP_DEC or codeValue == FMCE_Vol_Up_DEC or codeValue == 2976128878){
      digitalWrite(STATUS_PIN, HIGH);     
      for (int i = 0; i < 2; i++) {
        irsend.sendNEC(ONKYO605_Reciever_Vol_Up_DEC, 32);
      Serial.println("VOl Up Sent");
      digitalWrite(STATUS_PIN, LOW);
    //VOL DOWN
    if (codeValue == STV_VOL_DOWN_DEC or codeValue == FMCE_Vol_Down_DEC or codeValue == 3433199758){
      digitalWrite(STATUS_PIN, HIGH);
      for (int i = 0; i < 2; i++) {
        irsend.sendNEC(ONKYO605_Reciever_Vol_Down_DEC, 32);
      Serial.println("VOl Down Sen");
      digitalWrite(STATUS_PIN, LOW);
    if (codeValue == STV_MUTE_DEC or codeValue == FMCE_MUTE_DEC or codeValue == 1815191114){
      digitalWrite(STATUS_PIN, HIGH);
      for (int i = 0; i < 2; i++) {
        irsend.sendNEC(1270259807, 32);
      Serial.println("Mute Sent");
      digitalWrite(STATUS_PIN, LOW);
    irrecv.resume(); // resume receiver
3  Community / Exhibition / Gallery / Re: Arduino with Raspberry Pi on: May 25, 2012, 03:38:34 am
BeagleBone is nice and a good option for controlling an arduino. It is approximatly twice the price, but available.

But RPi has much more graphics processing power than the BeagleBone (or nearly any other embedded system) and a graphics output. That may not be improtant to some people, but even within the arduino community that maybe useful
4  General Category / General Discussion / Re: why people dont use open source for commercial perpose. on: May 23, 2012, 07:38:01 am
Most companies are afraid of open source software, as anyone could write in or find (by reading the source) a back door or security exploit.

Also open source hardaware/software often doesn't have the same level of support as hardware/software you buy.

Arduino can be used for commerical use, but it won't be arudino's fault if your project breaks something or hurt someone.

(Some linux distributions and things like apache are major exceptions to the above)
5  Development / Other Software Development / Re: Arduino Libraries Census and Repository on: April 30, 2012, 02:32:17 am
Having something like the XBMC's adddon system sounds like a good plan, but wouldn't a package manager be a more logical choice? A package manager would, for example, make it much easier to handle dependencies between packages. There are many package managers to choose from, but I personally think that the cross-platform, open source package manager Zero Install would be perfect for this. One of the nice things of 0install is that packages can be managed both centralized and decentralized.

I wasn't aware there were such things readily avaliable; I assumed the arduino team would need to start from scratch, which is why I used XBMC as a model. But if someone else has done the leg work for you then that seems like a easiler, quicker and better solution.
6  Using Arduino / Project Guidance / Re: Person sensing alarm clock on: March 14, 2012, 03:53:24 am
Does anyone have any bright ideas on how to detect whether I am still in bed or not?

I guess you could use the weighing techniques they use in these 'self scan' supermarket checkouts: look at the absolute weight to see whether anyone is in bed at the beginning, and look for a change in weight to see if anyone has got out.

Now that's a good idea.
7  Using Arduino / Project Guidance / Re: Simple Ball Drop Project - NEWBIE on: March 09, 2012, 09:24:03 am
Well to make it a little simpler you could use an Arduino BT, which is essentially an UNO with the shield built in. It will be a little smaller.

It is a little stricter on the input voltage (5.5v max) so you are limted to 3 regular AAA/AA/C/D cells in series.

As for the actuator, then a little servo is probably your best option. It could move an arm away out of the way allowing the ball to drop.

P.S. Nice way to make an enterance...
8  Using Arduino / Project Guidance / Re: Simple Ball Drop Project - NEWBIE on: March 09, 2012, 05:24:24 am
Depends how small you want to go, but an UNO with a Bluetooth shield and approprate relay would do what you want.

To go smaller you would need to use a nano and a bluetooth breakout board.
9  Using Arduino / Project Guidance / Person sensing alarm clock on: March 09, 2012, 05:15:49 am
Some mornings I get up as soon as my alarm goes off, but other days I turn off the alarm and fall back to sleep. So I want to make and alarm clock which only goes off if I am still in bed. The time will be set 5-10mins after my normal alarm and ideally won’t stop until I get out of bed.

Now the alarm clock aspect is relatively simple (RTC and a Buzzer) but the tricky bit is detecting there is someone in the bed. Load cells under the bed legs are the obvious choice, but that could get tricky to handle when my GF stays over. The other choice is I press a button when I get up to disarm the alarm, but that sort of defeats the point as:
1.   I can simply turn it off without getting up
2.   I want this to be automatic, otherwise I may as well use a regular alarm clock

Does anyone have any bright ideas on how to detect whether I am still in bed or not?
10  Using Arduino / Networking, Protocols, and Devices / Re: Non-blocking Server on: March 08, 2012, 11:00:13 am
I would imagine it is the delay(1); which is causing the pause, as delay basically stops the arduino.

Try taking the delay out and see what happens. You ought to avoid using delays wherever possible.
11  Development / Other Software Development / Re: Source code revision control on: March 08, 2012, 06:48:37 am
Personally I keep my WIP and test programs in my documents folder which is synced with my dropbox folder.

This gives me very quick access to my sketches from anywhere in the world and there is no messing around re-committing the code (simply save it to My Documents and dropbox does the rest). Dropbox also gives some revision control, as you can view and restore back to previous states.

Once I am happy with the code and want to make it public, I upload it to github.
12  Topics / Home Automation and Networked Objects / Re: Web server and web client together on: March 08, 2012, 06:32:28 am
I am guessing it is a DNS issue. The arduino is unable to convert the domain into an IP. I believe the updated ethernet library can handle DNS. Looking at the code it seems like you need to add something like:

const char myserverip[]
DNSClinet.getHostByName(myserver, myserverip);
Then the:
client.connect(myserverip, 80);

Or something like that.
13  Using Arduino / Programming Questions / Re: Problem with the new stream findUntil() on: March 07, 2012, 03:33:29 am
I see. I assumed that the buffer would be full with the entire string and the findUntil() would simply find the target string and then the read() read the next item in the buffer.

But as they block, I need to wait for the buffer to refil. The while(Serial.available() == 0) line makes the arduino do nothing until there is something for the read() to pick up.

(just saying it out loud to make sure I get it)

14  Topics / Home Automation and Networked Objects / Re: Raspberry Pi lauched today on: March 06, 2012, 10:44:22 am
Horses for courses. 

Pretty much.
15  Topics / Home Automation and Networked Objects / Re: Raspberry Pi lauched today on: March 06, 2012, 03:39:40 am
The R Pi would be useless for what I do with an Arduino which involves a degree of timing, the Arduino can happily time things to a single millisecond (a single microsecond if you push it) and it has degree of accuracy (even the Uno with a ceramic oscillator), the R Pi having a powerful multitasking operating system couldn't be depended on at all, if some other stuff it was doing (like system maintainance) was guzzling the clock cycles what you thought should happen in 10 milliseconds might take 10 seconds. The puny 8 bit processor in the arduino only does the task in hand and it doesn't have a system to maintain. 

You are right, out of the box the arduino will be the best choice when it comes to time critical processes.

But you could install a real time kernel and access the GPIO registers directly from your code (rather than using an abstraction layer such as the python module). At that point you essentially have a industrial CNC controller, which (depending on the implementation) could be as accurate as the arduino.
Pages: [1] 2 3 ... 7