| Bienvenido, Invitado |
Tienes que registrarte para poder participar en nuestro foro.
|
|
|
| Placa a 15v y heater 12?? |
|
Enviado por: ofitecno - 14-07-2023, 06:54 PM - Foro: General
- Respuestas (15)
|
 |
Buenos dias,
Tengo una impresora Vertex K8400 la cual funciona a 15v, tanto la fuente que trae de serie como la placa principal como el cartucho calefactor, todo a 15v...
Le tengo hechas bastantes modificaciones, entre otras le instale una cama caliente con una fuente adicional de 24v y cabezal E3d V6 manteniendo el calefactor de serie de 15v, la ultima que me estoy pensando es cambiar el fusor E3d V6 por un E3d Revo 12v o 24v, entiendo que de 24v no puedo salvo que utilice la fuente de 24v (la tengo para la cama caliente) y algun dispositivo adicional de electronica o bien el Revo de 12v y si no me equivoco limitar la entregada de tension por marlin?? estoy en lo correcto?
|
|
|
|
Adafruit Neo Pixel, 2 aros led a diferentes ms...? SOLUCIONADO |
|
Enviado por: luciano - 14-07-2023, 03:37 PM - Foro: Arduino
- Respuestas (1)
|
 |
Hola a todos, como están?
Le cuento que tengo 2 ring leds HW-159 de 7 leds cada uno (imagen 1). El primero quiero que este con una animación por ejemplo rainbow() con una velocidad de 500ms y el segundo al mismo tiempo con (por ejemplo) theaterChaseRainbow() en 900ms ambos con la librería de Adafruit Neo Pixel y no logro que funcionen bien. El código que estoy compartiendo es uno de los códigos de ejemplo que vienen con la librería de NeoPixel la cual reemplaza la función delay() por millis(), ideal para lo que quiero hacer pero a la hora de agregar un segundo aro de led es donde fallo y uno de los dos hace mal el efecto.
Imagen 1:
![[Imagen: ring-led.jpg]](https://i.ibb.co/zsCR69T/ring-led.jpg)
Link a la librería:
https://github.com/adafruit/Adafruit_NeoPixel
Componentes:
- Arduino UNO R3.
- 2 ring leds HW-159.
Esquema:
- Pin 3 conectado al led ring 1.
- Pin 5 conectado al led ring 2.
Código original:
Código: #include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
#define LED_PIN 3 //Aro 1
#define LED_COUNT 7 //Leds por aro
#define LED_PIN2 5//Aro 2
// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800); //Aro 1
// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip2(LED_COUNT, LED_PIN2, NEO_GRB + NEO_KHZ800); //Aro 2
unsigned long pixelPrevious = 0; // Previous Pixel Millis
unsigned long patternPrevious = 0; // Previous Pattern Millis
int patternCurrent = 0; // Current Pattern Number
int patternInterval = 5000; // Pattern Interval (ms)
int pixelInterval = 50; // Pixel Interval (ms)
int pixelQueue = 0; // Pattern Pixel Queue
int pixelCycle = 0; // Pattern Pixel Cycle
uint16_t pixelCurrent = 0; // Pattern Current Pixel Number
uint16_t pixelNumber = LED_COUNT; // Total Number of Pixels
// setup() function -- runs once at startup --------------------------------
void setup() {
// These lines are specifically to support the Adafruit Trinket 5V 16 MHz.
// Any other board, you can remove this part (but no harm leaving it):
#if defined(__AVR_ATtiny85__) && (F_CPU == 16000000)
clock_prescale_set(clock_div_1);
#endif
// END of Trinket-specific code.
strip.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
strip.show(); // Turn OFF all pixels ASAP
strip.setBrightness(50); // Set BRIGHTNESS to about 1/5 (max = 255)
strip2.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
strip2.show(); // Turn OFF all pixels ASAP
strip2.setBrightness(50); // Set BRIGHTNESS to about 1/5 (max = 255)
}
// loop() function -- runs repeatedly as long as board is on ---------------
void loop() {
unsigned long currentMillis = millis(); // Update current time
if((currentMillis - patternPrevious) >= patternInterval) { // Check for expired time
patternPrevious = currentMillis;
patternCurrent++; // Advance to next pattern
if(patternCurrent >= 7)
patternCurrent = 0;
}
if(currentMillis - pixelPrevious >= pixelInterval) { // Check for expired time
pixelPrevious = currentMillis; // Run current frame
switch (patternCurrent) {
case 7:
theaterChaseRainbow(50);
theaterChaseRainbow2(120);
break;
case 6:
rainbow(10);
break;
case 5:
theaterChase(strip.Color(0, 0, 127), 50); // Blue
break;
case 4:
theaterChase(strip.Color(127, 0, 0), 50); // Red
break;
case 3:
theaterChase(strip.Color(127, 127, 127), 50); // White
break;
case 2:
colorWipe(strip.Color(0, 0, 255), 50); // Blue
break;
case 1:
colorWipe(strip.Color(0, 255, 0), 50); // Green
break;
default:
colorWipe(strip.Color(255, 0, 0), 50); // Red
break;
}
}
}
void colorWipe(uint32_t color, int wait) {
if(pixelInterval != wait)
pixelInterval = wait; // Update delay time
strip.setPixelColor(pixelCurrent, color); // Set pixel's color (in RAM)
strip.show(); // Update strip to match
pixelCurrent++; // Advance current pixel
if(pixelCurrent >= pixelNumber) // Loop the pattern from the first LED
pixelCurrent = 0;
}
void theaterChase(uint32_t color, int wait) {
if(pixelInterval != wait)
pixelInterval = wait; // Update delay time
for(int i = 0; i < pixelNumber; i++) {
strip.setPixelColor(i + pixelQueue, color); // Set pixel's color (in RAM)
}
strip.show(); // Update strip to match
for(int i=0; i < pixelNumber; i+=3) {
strip.setPixelColor(i + pixelQueue, strip.Color(0, 0, 0)); // Set pixel's color (in RAM)
}
pixelQueue++; // Advance current pixel
if(pixelQueue >= 3)
pixelQueue = 0; // Loop the pattern from the first LED
}
// Rainbow cycle along whole strip. Pass delay time (in ms) between frames.
void rainbow(uint8_t wait) {
if(pixelInterval != wait)
pixelInterval = wait;
for(uint16_t i=0; i < pixelNumber; i++) {
strip.setPixelColor(i, Wheel((i + pixelCycle) & 255)); // Update delay time
}
strip.show(); // Update strip to match
pixelCycle++; // Advance current cycle
if(pixelCycle >= 256)
pixelCycle = 0; // Loop the cycle back to the begining
}
//Theatre-style crawling lights with rainbow effect
void theaterChaseRainbow(uint8_t wait) {
if(pixelInterval != wait)
pixelInterval = wait; // Update delay time
for(int i=0; i < pixelNumber; i+=3) {
strip.setPixelColor(i + pixelQueue, Wheel((i + pixelCycle) % 255)); // Update delay time
}
strip.show();
for(int i=0; i < pixelNumber; i+=3) {
strip.setPixelColor(i + pixelQueue, strip.Color(0, 0, 0)); // Update delay time
}
pixelQueue++; // Advance current queue
pixelCycle++; // Advance current cycle
if(pixelQueue >= 3)
pixelQueue = 0; // Loop
if(pixelCycle >= 256)
pixelCycle = 0; // Loop
}
uint32_t Wheel(byte WheelPos) {
WheelPos = 255 - WheelPos;
if(WheelPos < 85) {
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
}
if(WheelPos < 170) {
WheelPos -= 85;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
WheelPos -= 170;
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}
void theaterChaseRainbow2(uint8_t wait) {
if(pixelInterval != wait)
pixelInterval = wait; // Update delay time
for(int i=0; i < pixelNumber; i+=3) {
strip2.setPixelColor(i + pixelQueue, Wheel2((i + pixelCycle) % 255)); // Update delay time
}
strip2.show();
for(int i=0; i < pixelNumber; i+=3) {
strip2.setPixelColor(i + pixelQueue, strip2.Color(0, 0, 0)); // Update delay time
}
pixelQueue++; // Advance current queue
pixelCycle++; // Advance current cycle
if(pixelQueue >= 3)
pixelQueue = 0; // Loop
if(pixelCycle >= 256)
pixelCycle = 0; // Loop
}
uint32_t Wheel2(byte WheelPos) {
WheelPos = 255 - WheelPos;
if(WheelPos < 85) {
return strip2.Color(255 - WheelPos * 3, 0, WheelPos * 3);
}
if(WheelPos < 170) {
WheelPos -= 85;
return strip2.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
WheelPos -= 170;
return strip2.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}
Calculo que mi error viene por no duplicar las variables de tiempo (pixelCycle, pixelQueue, etc) ahora que redacto esta duda en el foro pero también con esto abro la siguiente pregunta, hay alguna forma mas prolija de hacerlo? No encontré en las funciones de Adafruit Neo Pixel la posibilidad de agregar otro modulo led con distinta animación o delay/tiempo pero no quiere decir que no exista, alguien sabe si existe?
Cualquier consejo será bienvenido.
Muchas gracias!
|
|
|
|
| My printer has a problem selecting a file |
|
Enviado por: LucasMaxwell - 11-07-2023, 02:31 AM - Foro: General
- Respuestas (1)
|
 |
I've had an Anycubic M 3D printer for a little over a year, and everything works fine except that once the SD card is inserted into the printer and I choose Print to choose the file I want to print, the screen freezes, it won't let me choose the file, download or upload, come back, nothing at all, and I'm desperate, I need to print. I tested it, and it could be from the SD, because without the SD inserted, I can reach the print menu and return to the home screen, which the SD does not allow me to do.
|
|
|
|
|