Show Posts
Pages: [1] 2 3 ... 5
1  Products / Arduino Yún / Re: Arduino Yun - How to close http client connections? on: May 18, 2014, 01:59:47 pm
cheers smiley
2  Products / Arduino Yún / Re: Arduino Yun - How to close http client connections? on: May 18, 2014, 11:29:41 am
Hi Federico,

I get a:
Code:
Arduino: 1.5.6-r2 (Mac OS X), Board: "Arduino Yún"
error: 'class HttpClient' has no member named 'stop'

Do you know if that have been removed? I can still see it in the documentation. My sketches run without it so I always assumed in was somehow integrated inside the HttpClient.
3  Using Arduino / Networking, Protocols, and Devices / Re: Interfacing with a 3G USB Modem on: May 15, 2014, 11:21:37 am
Whouah that's was so dry PaulS.   smiley-eek-blue
4  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 09:02:35 am
Victorian? Late Edwardian, perhaps!

As "if Victorian did do electronics", not as "historically accurate Victorian". Numitrons seems to be from the 70s anyway

Fair enough for the diagram, it would have made more sense.
5  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 08:34:05 am
1/ I don't remember which image you're talking about, but hey, it's working now

2/ I like the cartoon style (I'm a designer, sorry) but I see what you're saying, it's not very helpful. (the 74hc595 as 16pins and the TPIC6B595 as 20pins, and the Numitron as 9 legs not 8, so I don't think that would have helped).

3/ Well, the Yun is getting stuff from Twitter, and if yun find what it's looking for it will start up some mechanism. We wanted a Victorian style to our installation and those numitrons do have that pretty well. I can't really say more about the project, but I will definitely post it in the gallery once done.

6  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 07:50:54 am
Updated sketch smiley

(still not sure about the details but it works and it's beautiful)

Code:
//Pin to clear the register
const int clearPin = 7;
//Pin connected to latch pin (ST_CP) of 74HC595
const int latchPin = 8;
//Pin connected to clock pin (SH_CP) of 74HC595
const int clockPin = 12;
////Pin connected to Data in (DS) of 74HC595
const int dataPin = 11;

byte leds = 0;

/*
  Russian Datasheet
  0: 3,4,5,6,8,9
  1: 3,4
  2: 3,5,7,8,9
  3: 3,4,5,7,8
  4: 3,4,6,7
  5: 4,5,6,7,8
  6: 4,5,6,7,8,9
  7: 3,4,5
  8: 3,4,5,6,7,8,9
  9: 3,4,5,6,7,8
  <: 2

   ShiftRegister
  0: 2,3,4,5,7,8
  1: 2,3
  2: 2,4,6,7,8
  3: 2,3,4,6,7
  4: 2,3,5,6
  5: 3,4,5,6,7
  6: 3,4,5,6,7,8
  7: 2,3,4
  8: 2,3,4,5,6,7,8
  9: 2,3,4,5,6,7
  <: 1
  */

//Numbers
const byte numbers[11][8] = {
  {0, 1, 1, 1, 1, 0, 1, 1},
  {0, 1, 1, 0, 0, 0, 0, 0},
  {0, 1, 0, 1, 0, 1, 1, 1},
  {0, 1, 1, 1, 0, 1, 1, 0},
  {0, 1, 1, 0, 1, 1, 0, 0},
  {0, 0, 1, 1, 1, 1, 1, 0},
  {0, 0, 1, 1, 1, 1, 1, 1},
  {0, 1, 1, 1, 0, 0, 0, 0},
  {0, 1, 1, 1, 1, 1, 1, 1},
  {0, 1, 1, 1, 1, 1, 1, 0},
  {1, 0, 0, 0, 0, 0, 0, 0},
};

void setup() {
  //set pins to output because they are addressed in the main loop
  pinMode(clearPin, OUTPUT);
  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT);

  Serial.begin(9600);
  // delay a little and then set
  delay(100);
  // Always start by sentting SRCLR high
  digitalWrite( clearPin, HIGH);

}

void loop() {
  for (int n = 0; n < 11; n++) {
    leds = 0;
    updateShiftRegister();
    delay(200);//little pause to breath
    for (int i = 0; i < 8; i++) {
      if (numbers[n][i] == 1) {
        bitSet(leds, i);
        updateShiftRegister();
        delay(10);//light up one by one at 10ms
      }
    }
    delay(1000);//stay on for an exta 1s
  }
}

void updateShiftRegister() {
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, LSBFIRST, leds);
  digitalWrite(latchPin, HIGH);
}
7  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 07:39:53 am
That's from the Tutorial, I figured that it was were the issue was but I don't understand the logic yet. As soon as I do I will create repost the whole thing.

Also, the first code was messing up the logic of which leg to turn on in reference to the datasheet, as now it does match.
8  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 06:54:40 am
Haaaaaa! It's the code!

this example works perfectly: https://learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds/arduino-code

Now I need to figure out why as I really want to know.
9  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 06:17:11 am
Ok here's the image of the wiring. Couldn't find a TPIC6B595 in Fritzing so I used something with 20legs. Also no Numitron but I think it's clear. Also I'm testing on a old Deicimila before moving on to a Yun, just so I don't fry up the £60 Yun. But I don't that makes a difference.
10  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 05:35:50 am
Hand drawn will be fine, but having seen your earlier pic, I don't think a photo taken at any angle is going to help.

Haha, if you're referring to some old posts of mine on the forum I understand smiley I'm doing it Fritzing now.
11  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 05:25:04 am
Here's my sketch in case someone wants to look at it.

I did a check with my multimeter and the more pins at set HIGH on the shift register, the less voltage I get. Is there something I need to add to my setup to tackle that. For the moment, it's the numitrons legs straight to the shift register. I going to try to illustrate it.  

Code:
//Pin to clear the register
const int clearPin = 7;
//Pin connected to latch pin (ST_CP) of 74HC595
const int latchPin = 8;
//Pin connected to clock pin (SH_CP) of 74HC595
const int clockPin = 12;
////Pin connected to Data in (DS) of 74HC595
const int dataPin = 11;

/*
  Russian Datasheet
  0: 3,4,5,6,8,9
  1: 3,4
  2: 3,5,7,8,9
  3: 3,4,5,7,8
  4: 3,4,6,7
  5: 4,5,6,7,8
  6: 4,5,6,7,8,9
  7: 3,4,5
  8: 3,4,5,6,7,8,9
  9: 3,4,5,6,7,8
  <: 2
  */

//Numbers
const byte numbers[11][8] = {
  {1, 1, 0, 1, 1, 1, 1, 0},
  {0, 0, 0, 0, 0, 1, 1, 0},
  {1, 1, 1, 0, 1, 0, 1, 0},
  {0, 1, 1, 0, 1, 1, 1, 0},
  {0, 0, 1, 1, 0, 1, 1, 0},
  {0, 1, 1, 1, 1, 1, 0, 0},
  {1, 1, 1, 1, 1, 1, 0, 0},
  {0, 0, 0, 0, 1, 1, 1, 0},
  {1, 1, 1, 1, 1, 1, 1, 0},
  {0, 1, 1, 1, 1, 1, 1, 0},
  {0, 0, 0, 0, 0, 0, 0, 1},
};

void setup() {
  //set pins to output because they are addressed in the main loop
  pinMode(clearPin, OUTPUT);

  pinMode(latchPin, OUTPUT);
  digitalWrite(latchPin, LOW);
  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT);

  registerOff();

  Serial.begin(9600);

  // delay a little and then set
  delay(100);
  // Always start by sentting SRCLR high
  digitalWrite( clearPin, HIGH);



}

void loop() {

  /*
    //Counting (ignore the last one)
    for (int n = 0; n < 10; n++) {
      while (!wait(1000, false, " ")) {
        for (int i = 0; i < 8; i++) {
          if (numbers[n][i] == 1) registerWrite(i, HIGH);
          else registerWrite(i, LOW);
        }
      }
      //delay(100);
      wait(100, true, "Reset");//reset Wait timer.
    }

  */

  //Manual Test
  registerWrite(0, HIGH);
  registerWrite(1, HIGH);
  registerWrite(2, HIGH);



  /*
  //Goes through all filaments one by one);
  for (int i = 0; i < 8; i++) {
    registerWrite(i, HIGH);
    delay(1000);
    registerWrite(i, LOW);
  }
  */
}


// This method sends bits to the shift register:
void registerOff() {
  for (int i = 0; i < 8; i++) {
    registerWrite(i, LOW);
    delay(100);
  }
}

/*Not mine, from tutorial*/
void registerWrite(int whichPin, int whichState) {
  // the bits you want to send
  byte bitsToSend0 = 0;
  // write number as bits
  bitWrite(bitsToSend0, whichPin, whichState);

  // turn off the output so the pins don't light up
  // while you're shifting bits:
  digitalWrite(latchPin, LOW);

  // shift the bits out
  shiftOut(dataPin, clockPin, MSBFIRST, bitsToSend0);

  // turn on the output so the LEDs can light up:
  digitalWrite(latchPin, HIGH);
}
12  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 04:25:39 am
Ok, the multiplexing thing was silly of me, I got confused because of an old project I did using shiftregiters for a small led matrix, where I light up each rows in a quick sequence. Looking at my code and shiftregisters tutorial made me realised it  smiley-roll-blue  smiley-sweat

13  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 04:03:34 am
Hi Paul,

I thought shifregisters were multiplexing but they obviously don't if you say so. I tried to read about the difference but I'm not 100% sure of the difference. Does that mean that shiftregister have some kind of memory, you can set up each pin like actual independent pins and leave it? As multiplexing you have to keep setting pins, one by one in a quick sequence as only one at the time will be working (that I though was the behaviour of shift registers too)

Well if what I though was the "why" of my problem isn't anymore. Maybe it's a software issue, maybe I'm treating it like multiplexing. My sketch is based on the arduino tutorial for shift registers. I'm going to post the code when I'm back at my computer.

Thanks
14  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 10, 2014, 04:19:45 pm
I think I understood the why. The filaments are heated one after the other in a very quick sequence to give the illusion that they are all on at the same time. Because of that 3.5V or 4.5V takes to long to heat the filament in such a short amount of time, so it needs higher voltage to heat the filament quickly.  I think that's it?
15  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 10, 2014, 12:10:00 pm
I've done a test with one of those Regulated AC/DC Adaptor where you set the voltage, and it's does get brighter with higher voltage.

I've done that because at first I though that I was demanding to many mA from the Arduino as I was using the 5V from it. So I tried the Adaptor, as much as that was probably an issue that didn't change my problem.

One filament light up using 4.5V is still brighter than all filaments light up using 6V. I'm not really sure I understand what's going on there....
Pages: [1] 2 3 ... 5