sábado, 29 de octubre de 2022
domingo, 23 de octubre de 2022
manejo de teclado 4x4 matricial con arduino | arduino desde cero @Edi...
#include <Keypad.h>
const byte ROWS = 4; //four rows
const byte COLS = 4; //three columns
char keys[ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS] = {9, 8, 7, 6}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {5, 4, 3, 2}; //connect to the column pinouts of the keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
void setup(){
Serial.begin(9600);
pinMode(13,OUTPUT);
}
void loop(){
char key = keypad.getKey();
if (key){
Serial.println(key);
if(key == '1')
{
digitalWrite(13,HIGH);
}
if(key == '2')
{
digitalWrite(13,LOW);
}
}
}
sábado, 22 de octubre de 2022
lunes, 17 de octubre de 2022
sábado, 15 de octubre de 2022
manejo de pantallas LCD OLED 0.96 | arduino desde cero @Editronikx
codigo
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 32 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
// The pins for I2C are defined by the Wire-library.
// On an arduino UNO: A4(SDA), A5(SCL)
// On an arduino MEGA 2560: 20(SDA), 21(SCL)
// On an arduino LEONARDO: 2(SDA), 3(SCL), ...
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
#define SCREEN_ADDRESS 0x3C ///< See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
#define NUMFLAKES 10 // Number of snowflakes in the animation example
#define LOGO_HEIGHT 16
#define LOGO_WIDTH 16
void setup() {
Serial.begin(9600);
// SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
if(!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;); // Don't proceed, loop forever
}
display.clearDisplay();
display.setTextSize(1); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0,0); // Start at top-left corner
display.println("hola mundo");
display.setTextSize(2); // Draw 2X-scale text
display.setTextColor(SSD1306_BLACK, SSD1306_WHITE); // Draw 'inverse' text
display.println(123456);
display.display();
delay(3000);
}
void loop()
{
for (int i=0;i<10;i++)
{
display.clearDisplay();
display.setTextSize(1); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(30,0); // Start at top-left corner
display.println("contador");
display.setTextSize(2);
display.setCursor(40,10);
display.println(i);
display.display();
delay(1000);
}
}
viernes, 14 de octubre de 2022
🔥 LA MEJOR estación de CAUTIN para SOLDAR /DESOLDAR del mundo JBC DMPS...
https://www.jbctools.com/dmpse-q-4-tools-dme-station-with-electric-pump-product-1643.html
sábado, 1 de octubre de 2022
jueves, 29 de septiembre de 2022
domingo, 25 de septiembre de 2022
medidor de velocidad Km/h arduino y un GPS NEO 6m @PCBWay
codigo
#include <SoftwareSerial.h>
#include <TinyGPS++.h>
#define rxPin 12
#define txPin 11
SoftwareSerial neogps(rxPin,txPin);
TinyGPSPlus gps;
int pulso = 2;
void setup()
{
Serial.begin(9600);
neogps.begin(9600);
pinMode(pulso,OUTPUT);
Serial.println("Velocimetro");
delay(3000);
}
void loop() {
boolean newData = false;
for (unsigned long start = millis(); millis() - start < 1000;)
{
while (neogps.available())
{
if (gps.encode(neogps.read()))
{
newData = true;
}
}
}
//If newData is true
if(newData == true)
{
newData = false;
print_speed();
}
else
{
Serial.print("No hay datos");
}
}
void print_speed()
{
if (gps.location.isValid() == 1)
{
Serial.print(gps.speed.kmph());
//Serial.println("km/h");
// Serial.print("SAT:");
// Serial.println(gps.satellites.value());
// Serial.print("ALT:");
// Serial.println(gps.altitude.meters(), 0);
}
}
domingo, 18 de septiembre de 2022
sábado, 17 de septiembre de 2022
domingo, 11 de septiembre de 2022
impresionante impresora laser xTool D1 Pro 20W graba y corta madera, me...
link de compra https://www.xtool.com/?ref=uYySFVAV_qnJYJ&utm_source=influencer
esta impresora me sorprendió mucho por su calidad, precisión, facilidad de manejo y armado, buena potencia
Láser de alta potencia de 20 W: corte de tilo de 10 mm/acrílico negro de 8 mm en una sola pasada
Velocidad de trabajo de hasta 400 mm/s: ahorro de tiempo y eficiencia
Mayor precisión y estabilidad
Detección de llama/movimiento/vuelco para su seguridad
domingo, 4 de septiembre de 2022
martes, 23 de agosto de 2022
domingo, 21 de agosto de 2022
Suscribirse a:
Entradas (Atom)