r/ArduinoHelp

How Can I Make My QClaw Agentic Agent Faster on Arduino Uno Q?
▲ 0 r/ArduinoHelp+3 crossposts

How Can I Make My QClaw Agentic Agent Faster on Arduino Uno Q?

I created QClaw as an on-device agentic AI assistant for the Arduino Uno Q. It writes, compiles, and uploads Arduino sketches; captures camera frames; drives Linux-side LEDs; reports network state; and scans I²C buses, all running entirely on the board. No internet. No API keys. No cloud.

My biggest issue is that I want to improve the tokens/sec generation speed, which I've only been able to max out at 9 tokens/sec. Is it possible to use the Adreno GPU that's on the Arduino Uno Q to improve the speed of QClaw?

QClaw: A Fully Local Agentic Assistant on the Arduino Uno Q

u/Away-Ad-8572 — 21 hours ago
▲ 10 r/ArduinoHelp+1 crossposts

need help with code class

const int LED1 = 8;                               //LEDs 1 & 2
const int LED2 = 9;                               //digital output pins 8 & 9


const int s1 = 2;                                 //switch s1 = Save Button to store Preset 1 or Preset 2 (depending on s6 position)
const int s5 = 6;                                 //switch s5 = mode switch, up = Run Mode, down = Program Mode
const int s6 = 7;                                 //switch s6 UP = Preset 1, down = Preset 2


const int vr1 = 0;                                //vr1 = speed flash rate adjuster


int rawV;                                         //declares variable called rawV (raw value)
int scaledV;                                      //declares variable for scaledV (scaled value)


bool bs1;
bool bs5;
bool bs6;


void setup() {
  pinMode(8, OUTPUT);                             //sets LED1 (digital pin 8) as an output 
  pinMode(9, OUTPUT);                             //sets LED2 (digital pin 9) as an output 
  pinMode(A0, INPUT);                             //sets vr1 (analog pin 0) as an input.      ************* do i need to declare analog pinMode?
  pinMode(s1, INPUT_PULLUP);                      //set s1 (digital pin 2) as an input (ensures pin reads HIGH by default)
  pinMode(s5, INPUT);                             //set s5 (digital pin 6) as an input
  pinMode(s6, INPUT);
  Serial.begin(9600);
}
void loop() {
  programMode1 ();                                //calling programMode1 function


                                                  //PROGRAM MODE 1*
}    //read vr1 and convert values to flash LEDs at variable rate
void programMode1 (void)
{
  rawV = analogRead(A0); /sets rawV (raw value) to be read from vr1 (A0
  scaledV = map(rawV, 0, 1023, 50, 500); //defines scaledV
  digitalWrite(LED1, HIGH);         //turns LED1 on (sets pin 9/LED1 to 5V)
  delay(scaledV); //pause LED1 on for 50-500 ms (scaled value according VR1
  digitalWrite(LED1, LOW);                        //turns LED1 off (sets pin 9/LED1 to 0V)
  delay(scaledV);                                 //pause LED1 off for 50-500ms (scaled value according to position of vr1)
                                                  //save/store the flash rate into Preset 1 and Preset 2
  Serial.println(scaledV);
  delay(scaledV);


  bs1 = digitalRead(2);
  bs5 = digitalRead(6);
  bs6 = digitalRead(7);
                                                   //PRESET 1, save rate (s6 UP/preset 1) and confirm with LED2 flash*************************************************************
  if(bs1 == true && bs5 == false && bs6 == true )  //if s1 is pressed, s5 is down (PRGM), and s6 is up (PRESET 1)
  {                                       //then
    digitalWrite(LED1, HIGH);             //flash LED1
    delay(scaledV);
    digitalWrite(LED1, LOW); 
    delay(scaledV);
    
    digitalWrite(LED2, HIGH);                      
    delay(100);
    digitalWrite(LED2, LOW); 
    delay(100);
    digitalWrite(LED2, HIGH);                      
    delay(100);
    digitalWrite(LED2, LOW); 
    delay(100);
    digitalWrite(LED2, HIGH);                      
    delay(100);
    digitalWrite(LED2, LOW);
  }
}

i need help on how to save/store a value to a dedicated switch position as outlined below for program mode. The code block i posted is where im at right now I just don't know how to make it remember/store the scaled rate or assign that particular rate to stay on that switch position.

https://preview.redd.it/s6wjmu63by1h1.png?width=1092&format=png&auto=webp&s=1ca09ab49e380febc6f56355a949c6fd091c3577

reddit.com
u/IllustriousTune156 — 3 days ago
▲ 2 r/ArduinoHelp+1 crossposts

Is my sensor normal?

So guys, I bought a MAX9814 off robu.in, and wired both Gain and AR to GND. I soldered the pins and tested it, and here's how it outputs.

Code:

int MIC_PIN = A0

void setup() {

Serial.begin(115200);

}

void loop() {

int micValue = analogRead(MIC_PIN);

Serial.println(micValue);

delay(50); }

I'm looking forward to using this sensor to train an AI algorithm to recognize drone sounds.

BTW the sensor is right next to my laptop, speakes are near the screen, which is a little elevated.

u/Random_Dude2291 — 3 days ago

Servo help

I’m trying to make a sort of driving simulator for a class using arduinos and servos, and I’m having a couple issues I just can’t seem to figure out. I want the servo associated with “RPM” to reset back to original position on a button press (simulating shifting up) but it either stays at that position and won’t increment or constantly goes to max and then back down immediately. The other issue I’m having is with the actual simulating gear shifting I can get the value to increment fine and it works, but when I put in the same kind of code to decrement on a different button press the value skips to max/min instead of cycling through each value. Does anyone have any kind of advice or fix they have done in the past that is similar to these issues?

reddit.com
u/Positive-Mastodon-12 — 3 days ago
▲ 2 r/ArduinoHelp+1 crossposts

I need help wiring a reed switch into my circuit

I dont have a lot of experience with circuits so please help, i have an arduino nano and i am trying to hook up a nrf24 and a reed switch to it, i looked up videos online but i am still not sure how to integrate a reed switch instead of a normal button like in the picture. if someone could just tell me how i would wire that, that would be helpfu. also, im not using a breadboard as im trying to fit this into some kind of device i am making. oh and i am trying to power it just using a 9v battery, which im not so sure i wired the connector correcty

reddit.com
u/Kurisu-H — 4 days ago

5V DC to AC advice

I'm working on a school project right now, and I need to convert DC from the arduino to AC because the SSR we ordered says in the product description that it uses DC, but in the wiring diagram it says AC and it wasn't working with DC. Alternating high and low voltage with a low delay on the digital pins won't work because low isn't actually 0 and we need true zero to close the bridge.

This is the link to the SSR we ordered, if it helps: https://www.amazon.com/HiLetgo-SSR-60DA-Single-Semi-Conductor-24-380V/dp/B01MSTFKIP/ref=sr\_1\_2\_sspa?crid=167Y1HFWJE9W&dib=eyJ2IjoiMSJ9.Djvp1FJ9NzmFS0iDVnrgI6N8aFTj-InspTt\_vtwFNy2ErhiSRYlUnRFqS7OpUzuRYqj6hVVUEt8omqDVhZ1HPnk6ToiuqZ5to11uRWGZ3QwI1Z5FfFAXWAnkcC3pKgMIhBb6M7XJCZr\_Cr7cywXKBujgGrfwaTGBXUhq9vqUaFcSA4vvSRM7KgusYYTe8H7ldLcBt9mqNyBHmJ\_2AUmF3ylTuitFzzC\_MsNZKvic2qQ.ePfAzwPy8jMRM\_GRgSRgZ\_uhVMPCSey8BMu1TBynjJ8&dib\_tag=se&keywords=solid%2Bstate%2Brelay&qid=1774872290&sprefix=solid%2Bstate%2Brelay%2Caps%2C164&sr=8-2-spons&sp\_csd=d2lkZ2V0TmFtZT1zcF9hdGY&th=1

reddit.com
u/lordoftowels — 8 days ago

Small DC motor jerks instead of spinning smooth.

I am building a small robot and using a 12V DC motor with an L298N driver.

When I send a PWM signal from my Arduino Uno, the motor just jerks back and forth instead of spinning smoothly. I bought the motor and driver as a cheap bundle from my local town.

I am wondering if the motor is just low quality or if I have a code problem. I have tried different PWM frequencies and added a capacitor across the motor terminals and still no luck.

I have researched online for diffferent sellers in amazon , eBay and other online platfrom like alibaba . I am thinking of buying a new one .

Has anyone here dealt with cheap motors that behave like this?

Could it be a bad driver or a wiring issue?

reddit.com
u/2Nexxuzzz4 — 7 days ago

Need help making N2222 transistor work

The problem is that the n2222 piece gets really hot when I connected the fan. I don’t want to purchase the L298n motor since I’ve read that I can get it to work with the n2222. What am I doing wrong?

The fan did turn on after I pushed the blade a little bit.

u/At_Work_Looking_Busy — 7 days ago
▲ 8 r/ArduinoHelp+1 crossposts

Does anyone have a tip on how to get Fritzing? I don't want to set up a paypal account that I don't trust at all for one payment.

I would accept the price of €8 but I would prefer any other payment method than PayPal.

reddit.com
u/zlej_slein — 12 days ago

need help with creating an arduino automation for the google dino game

soo hey, i need to make an arduino automation for the dino game(as the title says) and i want to use two servos(the arm clicky things) and three ldr sensors

it should do something like this: the sensor furthest from the dino checks when a cactus appears, the sensor closest checks when the dino should jump and the time between the cactus appearing and reaching the threshold(so it can calculate the acceleration of the game, as it gets faster as the times goes on, so the hardware also gets fasters with the game)

and the third one would just be to check to when it should duck (when the ptero appears)

i really need it done, but i dont really know how to do it, im on the start of my first semester and i bit more than i could chew.

would really appreciate any help

i hope it makes sense, any ideias, even if it changes the core of the project would be helpful, if something didn't make sense, it basically is a way to play the dino game for "infinite" time

reddit.com
u/Oh_histuan — 8 days ago
▲ 11 r/ArduinoHelp+1 crossposts

unsure how to wire the photoresistor and light bulb

I am unsure how to wire the photoresistor and light bulb in my project, and If I should add resistors to piezo or not, any tips? Flow is supposed to be like this:

person comes by
movement gets detected
display asks for pin
pin entered
"happy buzz"
door opens
if night, light turns on, if day, light doesnt turn on
and its supposed to work in "sessions" while one person in, no one can come in until they come out

I know motor should be wired to external power, but for this use case I wired it to 5V

asked chatgpt, and he suggested adding resistors to motor and piezo

u/SilentThespian — 12 days ago
▲ 4 r/ArduinoHelp+1 crossposts

SIM800L powering issue - need to go from 5V to 4V

Hello. For a project I'm making, I need to power a SIM800L module having a 5V source power. I'm having trouble finding a way to get a stable 4V from the 5V source.

In case you're not familiar with the SIM800L:

  • Vin: 3.4V-4.4V.
    • The ideal voltage is 4V
    • It is not recommended to use a voltage too close to the minimum voltage, so the actual Vin can be ~3.8V-4.4V
  • Vin must be stable (or else RF communication will be noisy)
  • Operating current: 15mA-30mA
  • Sleep Mode current: 1mA-2mA
  • Peak current: 2A
    • They occur when the SIM800L is transmiting
    • They can be as short as 0.5ms (text messages) as well as 2 whole seconds (phone calls), and are abrupt.

I already have a decoupling capacitor of 2200uF for the SIM800L, which I'm sure will help with the short bursts, but I think it won't with the 2-second peak currents, right?

I researched about voltage dividers, diodes in series, LDOs and buck converters. But they either vary their voltage too much with the change of current, require a high voltage dropout (1.5V or more) or are too slow for the sudden bursts.

Is there any way to go from 5V to (stable) 4V with such a variable current?

I'd like to avoid using a step-up, since my power source can stand up to 3A and I also need to reduce the current consumption as much as possible

PD: my power source is a charger module of 2 18650 1s batteries with an output of 5V@3A. It doesn't have an output with the actual voltage of the batteries. I need to use the charger module because I need it as a UPS for my project. Haven't found any better alternative in my country. I cannot do one myself since I'm not that good at making circuits and I could end up burning the LiPo batteries (unless it's actually easy... which I'm sure it's not.......)

English is not my first language so sorry if it's a bit unclear.

reddit.com
u/Temporary-Working811 — 13 days ago
▲ 1 r/ArduinoHelp+1 crossposts

Hi, I'm having trouble uploading my program to the Arduino on Cachyos. I have a second PC with Debian and everything works without intervention, but when I used Ubuntu on this PC I always needed to use "chmod" for it to work.

And what about Cachyos? Since it's based on Arch, I don't want to do anything without asking first; I'm not 100% adapted yet ;)

reddit.com
u/mim_burro_vc_jumento — 13 days ago

Arduino uno q

Hi! I’m a graphic design student and completely new to Arduino/electronics.

Recently I got really interested in making interactive objects that feel kind of “alive” — like reacting to people, showing emotion through light/sound/movement, etc.

I started looking into Arduino Uno Q and TinyML stuff, but honestly I’m still super lost on where to begin 😭

Does anyone know if Uno Q is enough for this kind of thing, or if there are any beginner-friendly projects/resources I should look at?

Would really appreciate any advice!

reddit.com
u/YAO_CC — 12 days ago

Arduino Nano LED strip help

Hello, I am attempting to make a light up, magic sword for my renaissance faire outfit. however I can not get my circuit to work, and I have no Idea about the code.

all I want it to do is have one button to turn the whole thing on or off, then another that will cycle through 6 or 7 different color presets. It will have 3 LED strips. each with 15 LEDs. all the LEDs will do the same thing, even though I know they can be programmed separately.

I have included a pic of the circuit (not like it helps, its rough and has wires just out there not cleaned up. I intend to make it all neat once I get it working, a crude drawing of my circuit (and noticed a mistake, my capacitor is 1000μF not 100μF), and a image of what I made for the sword in Fusion 360.

I was following youtube tutorials but my LEDs wouldn't light up. I have been at this for a couple weeks and I am out of all ideas.

any and all help would be greatly appreciated, I can also provide more info if it its needed.

u/Ketzer_Jefe — 13 days ago

Newbie Question: Do I need to unplug external 12V power before uploading code?

Hi everyone,
I’m new to Arduino and robotics. I’m currently building a flywheel project using an Arduino Uno R3, an L298N motor driver, and a DC motor.
My setup is powered by a 12V wall adapter plugged directly into the Arduino’s DC barrel jack.
When I want to update or change my code via USB, do I need to completely disconnect the 12V power and the L298N wiring, or is it safe to keep everything plugged in while the Arduino is connected to my computer? I want to avoid frying my board or my USB port.
Any advice on the best workflow for frequent code iterations would be appreciated!

reddit.com
u/Square_pants080 — 14 days ago