Show Posts
Pages: 1 2 3 [4] 5 6 ... 181
46  Community / Bar Sport / Re: Scotland Reveals Currency Plan on: September 18, 2014, 03:03:13 am
Despite the polls showing an almost 50-50 split I think the no votes will win (though I would prefer Yes). The yes voters are very vocal compared to the no voters and I suspect some are just saying yes to avoid getting their windows/heads panned in but when behind a polling booth will vote no.
47  Using Arduino / Sensors / Re: Detect 0.1mm object on: September 18, 2014, 02:53:20 am
This is where a picture paints a thousand words. Is it possible to show pictures of the two items your trying to separate?

If one version of your object has a tab sticking up and the other version does not then could you just use a bar angles across the conveyor to catch the tabbed one and slide it to the side?
If not then for such a thin tab width you might me able to use a laser beam break to detect tabs passing by but how will you then separate them?
48  Using Arduino / Programming Questions / Re: which SPI mode Should I Use ? on: September 18, 2014, 02:02:24 am
"The Clock  phase should be configured so that data is centered on the first positive going edge of the
SCLK period and the polarity should be chosen so that the SCLK line is low in idle state"
Have a look here for a visual representation of CPHA & CPOL.
SCLK idle low = CPOL0
Data centred on rising edge = CPHA0
The SPI reference here says that's SPI_MODE0 that I think this is default though the documentation does not say that.
49  Using Arduino / Interfacing w/ Software on the Computer / Re: Processing code for arduino on: September 17, 2014, 10:33:35 am
There are a few add on libraries for processing that give you buttons etc. Have a look here for one version.
50  Development / Other Software Development / Re: How about including an "XLoader" program in arduino distribution? on: September 17, 2014, 03:11:10 am
Quote
Unfortunately the author to the program probably abandoned the project (no open source code found). In its latest version, it doesn't support arduino mini or nano or other chips.

I wonder if someone would be interested in making such a program (and open source) that supports more chips. It's dead easy with xloader and faster.
Maybe I'm really missing the point but the XLoader file comes with a devices.txt so is it as easy as adding the newer chips to that list?
Code:
Mega(ATMEGA1280);m1280;stk500;57600;
Duemilanove/Nano(ATmega328);m328p;stk500;57600;
Duemilanove/Nano(ATmega168);m168;stk500;19200;
Uno(ATmega328);m328p;stk500;115200;
Mega(ATMEGA2560);atmega2560;stk500v2;115200;

EDIT: You may also need to add entries to the avrdude.conf file also included in download.
51  Using Arduino / Sensors / Re: Looking for 1Kohm I2C Digital pot on: September 17, 2014, 03:04:01 am
How about this. 1K, 256 step, I2C.
52  Using Arduino / Programming Questions / Re: ArduinoISP sketch is bad ? on: September 16, 2014, 12:16:36 pm
Have you got a suitable arduino ATtiny85 core (there are a few) and installed it correctly in the Arduino IDE?

To use the ArduinoISP you need to set board type to UNO then upload the ArduinoISP sketch to your UNO.
Disconnect the UNO from power and connect the ATtiny85 as per instructions on the playground to the UNO.
Also connect the capacitor to prevent the UNO from auto resetting.
Connect the UNO again to USB/power.
Select ATtiny85 board type in the IDE and load your ATtiny85 sketch you want to upload.
Ensure 'Arduino as ISP' is selected in tools/programmer menu of the IDE.
Select 'File/Upload Using Programmer' and the sketch should compile and be uploaded to the tiny via the UNO.

Be aware that not all libraries etc work on the tiny as it has fewer chip resources/features than the UNO but if it compiles when the tiny is selected as target device you have a chance.
53  Using Arduino / General Electronics / Re: 3.3V simple vs zener on: September 16, 2014, 03:12:39 am
Can you convert the entire UNO to 3.3V or use a 3.3V derivative?
I have a 3.3V UNO converted from 5V using this tutorial.
54  Using Arduino / LEDs and Multiplexing / Re: Trouble in LED dimmer control using 'smooth' control on: September 15, 2014, 05:26:17 am
Use
Code:
val = analogRead(pin) <<2);
To put the pot value into the range 0 to 255
Typo?
55  Community / Bar Sport / Re: Who hasn't accidentally touched a mains voltage once or twice? on: September 15, 2014, 04:00:47 am
I have had a few mains shocks in my life and once a shock from a monitor tube (that one I do not want to repeat) but the worse ones for me are the pin prick burns from touching cold cathode inverters accidentally, they can take weeks to clear the deep burn marks.
56  Using Arduino / Displays / Re: Need help with display on: September 07, 2014, 10:40:50 am
Google finds this but it seems the guy never made it back home to redraw it. It seems a plausible drawing if the display is out of a 12 hour clock where the first digit is either blank or 1.
57  Using Arduino / Sensors / Re: What is the best color sensor? on: September 07, 2014, 01:35:36 am
Has anyone been able to get a color sensor to work?  What sensor did you use and could you share your code?  Thanks.
I have done nothing other than test it but I have one of these and used sample sketch to read it. Adafruit products are usually very well supported and they probably have demo code and tutorials on how to use the sensor you have (assuming it came from them).
Code:
// *** Connect OUT to pin 2 (Interrupt 0)

/*  S0 & S1 = Frequency scaling
     L , L = Power down
     L , H = 2%
     H , L = 20%
     H , H = 100%    */
const byte S0=3,S1=4;

/*  S2 & S3 = Photodiode type
     L , L = Red
     L , H = Blue
     H , L = Clear (no filter)
     H , H = Green   */
const int S2=5,S3=6;

const int sampleDelay = 100;

volatile unsigned int Counter = 0;

void setup() {
    Serial.begin(9600);
    // All control pins to output
    pinMode(S0,OUTPUT);
    pinMode(S1,OUTPUT);
    pinMode(S2,OUTPUT);
    pinMode(S3,OUTPUT);
//    // Set scaling to 2%
//    digitalWrite(S0,LOW);
//    digitalWrite(S1,HIGH);
    // Set scaling to 20%
    digitalWrite(S0,HIGH);
    digitalWrite(S1,LOW);
    // Attach handler
    attachInterrupt(0, pin2InterruptHandler, CHANGE);
}

void pin2InterruptHandler()
{
    Counter++;
}

void loop() {

    unsigned int Red = 0;
    unsigned int Green = 0;
    unsigned int Blue = 0;
    unsigned int Clear = 0;
    
    // Red filter
    digitalWrite(S2,LOW);
    digitalWrite(S3,LOW);
    noInterrupts();
    Counter = 0;
    interrupts();
    delay(sampleDelay);
    Red = Counter;
    // Green filter
    digitalWrite(S2,HIGH);
    digitalWrite(S3,HIGH);
    noInterrupts();
    Counter = 0;
    interrupts();
    delay(sampleDelay);
    Green = Counter;
    // Blue filter
    digitalWrite(S2,LOW);
    digitalWrite(S3,HIGH);
    noInterrupts();
    Counter = 0;
    interrupts();
    delay(sampleDelay);
    Blue = Counter;
    // Clear filter
    digitalWrite(S2,HIGH);
    digitalWrite(S3,LOW);
    noInterrupts();
    Counter = 0;
    interrupts();
    delay(sampleDelay);
    Clear = Counter;
    
    Serial.print("Red = ");
    Serial.print(Red);
    Serial.print(", Green = ");
    Serial.print(Green);
    Serial.print(", Blue = ");
    Serial.print(Blue);
    Serial.print(", Clear = ");
    Serial.println(Clear);
}
58  Community / Exhibition / Gallery / Re: LED Clock. NEOPIXEL used. on: September 07, 2014, 01:27:52 am
No, you got me wrong.

I wasn't telling you how to suck eggs, rather there was a trap which had me stuck for a while.
Sorry but you misread my reply, I was saying sorry if you feel like your sucking on an egg with me prattling on about mod etc. smiley-confuse

OK, so you make your hour hand have two LEDs either side.  What happens when the second hand or minute hand "overlap"?
The hour hand is 5 leds wide in total, the minutes hand is 3 leds and the seconds 1 led. The minutes overlap the hours and the seconds is mixed over both with cross fading between pixels as it moves.
I just realized I may have posted a newer test version than the one I'm describing. I will have to load it up and test when I'm next at home (5 days).


Today I am going to look for something to house the clock/ring to make it look nice.
Good luck with that, the code I posted was written on 2nd July 2014 and I still don't have a case.
59  Using Arduino / Installation & Troubleshooting / Re: Arduino Nano - vid pid on: September 06, 2014, 09:10:33 am
With program USBView i saw that my Arduino Nano has vid set to 0x067B and pid set to 0x2303. So i belive that why i cannot install this drivers..
According to searches vendor ID 0x067B belongs to a company called Prolific and product 0x2303 is a "USB 2 Serial Comm Port". Can you check your chips on the Nano to confirm this?
If it is Prolific then drivers are downloadable from here.
60  Using Arduino / Microcontrollers / Re: Does anyone have the files to run Arduino on an ATmega32M1? on: September 06, 2014, 06:47:46 am
Riva, thanks for the inquiry.  I've tried my own code, but something isn't quite right.  I cannot get an LED to blink! 
As the LED is not blinking that makes me think the core is not correct and either not setting system up correctly on power one or crashing/ locking up.
The site Crossroads linked to does not seem to have a core to support your 32M1 so maybe someone who knows how (not me BTW) will be able to change/write a core. Another option might be to use a different development environment to Arduino and port code/libraries to suit it.
Pages: 1 2 3 [4] 5 6 ... 181