Recent Posts

Pages: 1 ... 6 7 [8] 9 10
71
@jremington:

Thanks for the reply.

If the Arduino cannot sink as an input, how would I read the output from a Line Driver encoder? would something like the schematic I have attached work and be safe for the board?

Edit: I just checked the datasheet and it says the line driver output has a maximum of 20mA per channel, and the voltage Vcc is 5V.
72
Now I know even the mention of indentation preferences is going to start a couple thousand fires, but whatever (That's why it's in preferences :P ).

This change can be done by manually editing the preferences file (the option with the slightly cryptic name "editor.tabs.expand"), but I think it should be more accessible than that.

:)
73
Build one, schematics available at the sparkfun site.
And attached here.

Can you tell us your electronics, programming, Arduino, hardware experience?

Tom.. :)
Hey, thanks for the message!

I can try building it. I have a bit of programming experience but this is for a school project that took an unexpected technical turn. I don't have much arduino or hardware experience at all.
74
Microcontrollers / Re: Upgrade from Arduino UNO
Last post by westfw - Today at 05:27 am
Quote
I think I need to keep 5v I/O for LEDs and relays on my project.
Here is what my research found to upgrade to? what do you think?

  • Arduino Zero, Arduino M0, Arduino M0 Pro, Intel Galileo

I don't think that any of those have 5V I/O...
75
Français / Arduino FastLED double canal
Last post by clementvi - Today at 05:27 am
Bonsoir,

Je suis un peu perdu dans mon code, je sais ce que je veux mais j'ai du mal a le coder.

Voila j'ai deux rubans WS2812 sur le même canal. J'aimerais ajouter encore 2 pixels mais le soucis c'est que les données une fois passé par le canal 1 si je branche mes 2 pixels supplémentaire, j'ai des soucis au niveau des couleurs, mauvaise couleurs, clignotement..

Channel 1 (pin 2) mes deux rubans
Channel 2 (pin 6) mes deux pixels

Je pourrais utiliser transmettre via un Bus différentiel mais j'aimerais le faire via software
Le tout doit fonctionner avec hyperion sur RPI (le reste du code)

Voici mon début de code:

#include "FastLED.h"
 
// How many leds in your strip?
#define NUM_LEDS_ALL 6

#define NUM_LEDS_CH1 4
#define CH1_DATA_PIN 2

#define NUM_LEDS_CH2 2
#define CH2_DATA_PIN 6
 
// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_PIN.  For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN

#define CLOCK_PIN 13
 
#define COLOR_ORDER GRB
 
// Adalight sends a "Magic Word" (defined in /etc/boblight.conf) before sending the pixel data
uint8_t prefix[] = {'A', 'd', 'a'}, hi, lo, chk, i;
 
// Baudrate, higher rate allows faster refresh rate and more LEDs (defined in /etc/boblight.conf)
#define serialRate 460800
 
// Define the array of leds
CRGB channelOne[NUM_LEDS_CH1];
CRGB channelTwo[NUM_LEDS_CH2];
 
void setup() {
     FastLED.addLeds<WS2812B, CH1_DATA_PIN, GRB>(channelOne, NUM_LEDS_CH1);
     FastLED.addLeds<WS2812B, CH2_DATA_PIN, GRB>(channelTwo, NUM_LEDS_CH2);
     
     // initial RGB flash
     LEDS.showColor(CRGB(255, 0, 0));
     delay(5000);
     LEDS.showColor(CRGB(0, 255, 0));
     delay(5000);
     LEDS.showColor(CRGB(0, 0, 255));
     delay(5000);
     LEDS.showColor(CRGB(0, 0, 0));
       
     Serial.begin(serialRate);
     Serial.print("Ada\n"); // Send "Magic Word" string to host
 
}
 
void loop() {
  /*
  // wait for first byte of Magic Word
  for(i = 0; i < sizeof prefix; ++i) {
    waitLoop: while (!Serial.available()) ;;
    // Check next byte in Magic Word
    if(prefix == Serial.read()) continue;
    // otherwise, start over
    i = 0;
    goto waitLoop;
  }
 
  // Hi, Lo, Checksum
 
  while (!Serial.available()) ;;
  hi=Serial.read();
  while (!Serial.available()) ;;
  lo=Serial.read();
  while (!Serial.available()) ;;
  chk=Serial.read();
 
  // if checksum does not match go back to wait
  if (chk != (hi ^ lo ^ 0x55))
  {
    i=0;
    goto waitLoop;
  }
 
  memset(leds, 0, NUM_LEDS_ALL * sizeof(struct CRGB));
  // read the transmission data and set LED values
  for (uint8_t i = 0; i < NUM_LEDS_ALL; i++) {
    byte r, g, b;   
    while(!Serial.available());
    r = Serial.read();
    while(!Serial.available());
    g = Serial.read();
    while(!Serial.available());
    b = Serial.read();
    leds.r = r;
    leds.g = g;
    leds.b = b;
  }
  */
  // shows new values
 FastLED.show();
}

Merci a vous
76
hola a todos,soy nuevo aqui y queria saber si podia rcibir un poco de ayuda en un proyecto que consiste en hacer un seguidor de movimiento con un ardino uno,un servomotor y un ultrasonico hc-sr04, pero el problema esta en que no se mucho sobre la programacion y no se cual usar ni como hacerla,ya investigue y no encontre nada parecido,por favor alguien que me ayude o me asesore por favor gracias.
77
Local Groups / Re: Looking for Arduino relate...
Last post by nunu4692 - Today at 05:19 am
im in perth amboy. hit me up at google plus at nunu46922@gmail i have some projects of my own write me there.
78
How fast can you read the display, because it's only going to be there for a few microseconds. Perhaps a delay() would help. Also, it's almost never good to have closely-named variables (e.g., matrixSwitched, matrixSwitch). Finally, please read Nick Gammon's post at the top for the Forum on how to use code tags for posting source code.
79
Microcontrollers / Re: Upload without FTDI...
Last post by westfw - Today at 05:15 am
I think SW USB is an abomination that should die a quick death in the face of cheap microcontrollers that include a hardware USB controller, like the SAMD21 STM32f1xx, and PSoC4.  (A SAMD21 chip with HW USB and 64kB of flash has a list price somewhat lower than JUST the ATmega328p used on the Uno.)  (I think Leonardo, with the ATmega32u4, was supposed to be a step in this direction, but it doesn't seem to have gained in popularity or lowered in price the way we would have liked.) (Unfortunately, the core Arduino team does not seem very motivated to produced boards with a price point lower than Uno/Leonardo.   There are probably very good business reasons for that, too.)
80
Yes, you need a pulldown.

No, Arduino input pins do not sink current.
Pages: 1 ... 6 7 [8] 9 10