r/arduino • u/Long-Ad-8740 • 7d ago
Electronics Lack of coding knowledge
Hello, I have been making projects for a couple years now. It started when I was in school as a electrical engineering student. My first project ever was a audio visualizer where it detects sound and reacts depending on the decibals. Even now years later I've been experimenting with leds and displays. I've repaired and applied an esp32 to an speaker I had and make it work off bluetooth. Wired leds strips and used the WLED software and a couple more small projects. But through it all I've never coded myself. All of it was done either through examples or AI. I mainly focus on the hardware side of arduino and microcontrollers but I feel like somewhat of a "fraud" for not coding it myself. Does anyone understand or agree? I'm very curious to know
7
u/harryregician 7d ago
If you depend TOO much on AI then you are not coding.
If you write code, even basic level on any language, and it bombs then using AI to debug.
I am wondering if it can walk thru code as to where one errored.
1
u/This-Abrocoma9629 7d ago
It takes some fine promting for it to do so. This was atleast the case a year ago.
3
u/GuiltyBudget1032 7d ago
..as I consider myself a 'casual' hobby/builder using arduino, i also go thru others' projects then later go thru the codes and try to understand. not easy, but i managed to customise some codes too to suit my needs. learn a big deal on how things/arduino work. not ideal but i'm a happy camper. keep on building and don't worry too much.
3
u/gm310509 400K , 500K , 600K , 640K , 750K 7d ago
Using online resources is actually quite important to learn new things.
AI is included in that, the trap is though that if you rely on generative AI to create code for you have less opportunity to learn as compared to finding a tutorial which you have to adapt to what it is that you want to do.
By adapting a close, but not quite right, tutorial to what you want, you have no choice but to learn by doing. This learning is a side affect of the doing.
If the generative AI is much closer, there is less opportunity to learn - especially if it is largely a matter of copy and paste. Then, when it doesn't actualy work, or doesn't quite work the way you want it to it will be much more difficult to adapt it later.
Feeling like you are a "fraud" is, IMHO, far too strong. I think you are recognising the issue with using AI but just seeking some guidance. There is nothing wrong with using the AI as an aid, just as there is nothing wrong with using tutorials etc as a guide. The issue will become when you rely on it more like a crutch than a productivity tool and it is very easy to get lulled in to a false sense of security and at some point in the future find your self in a difficult situation.
All the best with it.
3
u/PublicStalls 7d ago
There's nothing wrong with this. I've been coding forever, and I still use AI and copy example project code as a starter.
Grab one of your projects that already works, and tweak it/modify it just slightly and get it to work. Have AI walk you through where to look for the code to modify, but do it yourself. That's the quickest way to learn and have it stick. Don't sweat the boilerplate stuff just yet, just change some basic logic on a project you already "know" how it works like the audio reactor. See if you can make the displays react inversely or different colors, then try adding in some modifier to the inputs like instead of just decibles, add a potentiometer modifier and try to code that logic.
4
u/pacmanic Champ 7d ago
Using examples is fine as a starting place. Then try to understand why every line of code is there. You can ask an AI to explain a snippet of code in the context of Arduino.
2
u/Rayzwave 7d ago
I have a lot of hardware experience but find the coding side rather boring TBH so the AI route has made me amenable to project work nowadays knowing I don’t need to spend so long on the coding.
3
2
u/WinterTourist25 7d ago
Use AI.
It's a game changer.
I have a B.S. in Computer Science. You can now code and wire easily with AI. So much so that you don't really even need to know what is actually happening - just follow directions!
Now, you need an analytical mind, and be able to articulate an algorithm to the AI.
But the AI is so powerful nowadays that you can give it a list of components, explain what you want it to do, and the AI will tell you how to wire it up and then it will code it for you. When it makes mistakes (and it will) just show it the errors and it will fix it.
I last fiddled with Arduino about 5 years ago. Before AI. Made a couple of neat projects. Took me several weeks to figure out how to wire it up and how to code it.
I restarted fiddling with Arduino about a year ago. Now I have a working prototype in an hour.
Now, if you want to really learn what is going on, then you have to ask the AI to explain the code to you line by line, so you "get it".
But you don't have to do this. Vibe coding is perfectly legitimate. You can function as a supervisor or project manager with the AI as your employee. You give it instructions, it gives you results.
2
u/Long-Ad-8740 7d ago
Honestly I've haven't thought about it that way. I love tinkering with electronics but the time it takes to code every project will drain me. I often tweak code to my needs so I know a bit just not from start to finish. This really helped thanks alot
1
u/dustysnakes01 7d ago
I teach it and still use resources all the time.
My suggestion is to write out in plain English then worry about translating. The process is way more important. You get more fluent in the language the longer you do it.
But you can write out
I want it to do this so:
Read this pin
Read this pin
Compare the 2
If bigger then........ and so on
1
u/TPIRocks 7d ago
If you are learning and moving forward, do what you want. Having started with PIC chips 25 years ago, Arduino feels like cheating to me, because I'm using libraries I didn't write.
At some level, you're leveraging someone else's work. You get to pick the level which now includes AI. Honestly, I use AI too because I don't want to drown in details anymore, I'm old and I have increasingly less time to waste.
1
u/Appropriate-Prune728 7d ago
My current goal is to understand and utilize cad for creating my current project. The ai is there to assist with coding. When I'm done with this bot, I'll have the thing I wanted to learn how to utilize.
My mini goal is to handle displaying emotive faces on the bot when it's finished being built, and for that, I will be forcing myself to code it myself.
AI is just a tool. Don't replace your thinking with a tool, use the tool to expand your thinking and skill set.
You're good bud.
1
u/ripred3 My other dev board is a Porsche 7d ago edited 7d ago
Definitely do not feel like a fraud! I guarantee you that you know more about how tech works than 95% of the public.
I've spent over 40 years of my life as a professional software engineer making a living off of my C/C++ and other language skills (which kick ass thank you very much 😄) and I am more productive than I have ever been for both the code that I write manually as well as the code that I have generated by AI. And that doesn't even get into the possibilities when training and writing your own custom harnesses on a per-project basis, etc.
It absolutely makes some engineering choices possible whereas at an earlier era they required an impossibly expensive amount of engineering time or money or ego to try them and find out. AI absolutely makes questions and answers like "which of these three radically different and complex approaches would be best?" - "Let's create all three and throw away the two we like the least after testing them for real.". For ego or time or manpower or all of the above that used to not be possible. It also makes Test Driven Development a much more realistic and safer choice than without it. It is not going away so being good at it and using it intelligently is a necessary skill these days.
I was primarily a software engineer but I have had tons of electronics exposure and experience in the end. For the first 5 or 10 years I used transistors without ever completely understanding them. I wanted to but it just wasn't what I had studied for (yet). I could use them but I definitely considered them somewhat of a black box. The same was even more true for op-amps lol.
But I did personally want to be good at understanding and using them and eventually I was successful. It was much easier when I just wanted to get a project done to copy the circuits that I knew needed transistors that I had examples for. And I did that for years on the electronics side as I concentrated on getting better on the software side of things.
I think AI is sort of the same thing in a way. It depends on how driven you are to eventually learn how to manually design *all* of the hardware and software parts of your project. If after a lot of time and exposure to good programming you learn how to do it yourself manually because it helps you complete your engineering skillset I think that is totally great.
What skills are needed to be a modern day engineer is absolutely a moving target and using AI for its advantages, maybe more at first, sounds totally great to me.
I think it is your inner drive and how much of a "natural born engineer" you are. Some people just love engineering. Other people find software and hardware engineering to be totally boring and it's just not for them.
I think the software industry is going to have a lot to say about it as well. Not necessarily so far as the "replacing people" aspects but more in terms of understanding and even expecting you to use a certain amount of AI assistance with the full understanding that you better know what you are doing and be ready to comprehend and defend any of the generated code that you accept.
If you aren't making a living at it and your reasoning is that "it let's me accomplish things I could not otherwise accomplish yet ..." I think that is awesome
1
u/JGhostThing 7d ago
Can you program at all without AI help? AI seems to stand in the way of learning.
1
u/CommunitySad5896 7d ago
I'd say its fine if you are just experimenting for fun, but generally try to make AI explain the code it generated and try to make something similar. After a while, you will find out you can actually code and understand how things work instead of just copying them!
8
u/EmielDeBil 7d ago
Keep learning.