Complete newb - introductions

Hey there! I thought I’d introduce myself and thank everyone in advance for all the help and guidance I’ll hopefully find here as I fumble my way into the world of Arduino. I’m a chronic tinkerer and have fully fallen into this Arduino rabbit hole and am super excited about it. I feel like I want to automate everything!

I didn’t come here completely naive - I was introduced to these little “computers” through the V1 Engineering machines having now built three. I then bought a Creality Ender 3 which required an Arduino to reflash the board and voila - an Uno had entered my life.

I’ve since plowed my way through a knockoff starter kit (Elegoo) and am filled to the brim with thoughts, ideas and questions. I told my daughters (10 and 6) that we can build a few OTTOs together and have ordered all the bits. Just waiting for the slow boat to arrive now. Once those are complete I have a funny feeling there’s some home automation stuff to come, perhaps some fancy auto lighting installations on our sailboat, maybe some functional Rube Goldberg contraptions....who knows!

So with that all on the table I wanted to pose my first question. Having run through most of the starter kit and learning about what each piece does and the sort of feedback some pieces provide (like temp and humidity, light levels, distance etc) my question is simply - do you basically decide what your widget is to do, assign a pin (or pins) to the components that will help your widget do what needs to be done and then add the code for each bit of the widget one by one until you’re done?

The little code samples in the starter kit for example....I was able to light an RGB LED and it faded from color to color. I was also able to hook up a joystick and see the x/y feedback. But these two bits were independent of each other. I’m guessing that I could merge the two projects, write a bit of code and make it so I control the color with the joystick so top left is red, top right is blue, bottom middle is........and so on?

Is that kind of the right understanding of how this stuff works on a very basic level? I was surprised the kit never attempted to really merge components once you’d run through each individually.

Welcome to the forum! I've done many projects with arduino myself. It's addictive isn't it? Besides things I built for work, I've made a sprinkler control system with arduino and parts. Yes, many arduino pins are generic enough so that many of the pins can do things such as controlling RGB LEDs. Same goes with reading joysticks. You have 6 analog pins on UNO to read joysticks. You can use any two. Now the hard part is combining code. Because most sample code was written to provide that one feature, combining several sample programs is not easy task. Once you have one program running, tinker with it and see how you can change the behavior of the program. I don't know what RGB LED you have and what the sample code does. I imagine it has some loops to loop through different colors. If you dissect the program, you will probably find these things:

  1. code that initialize the RGB LED, maybe in setup()
  2. code that sets the RGB LED to a specific color, maybe in loop()

Same goes for the joystick code. Tinker with it and find how it reads the joystick, probably with analogRead() function.

Now to combine them, you need to think how you want features from each program to interact. An example is to have one axis readout affect the brightness of one prime color. You only have two axes so the third prime color is left out. That's OK. You'll find ways to add it back in somehow, say x axis goes through the whole rainbow and y axis determines brightness.

Now you take elements from both code and construct your own, not just mechanically combining the two sample programs, but to take elements from both to make your new one. Maybe look up the map() function for ideas to map joystick reading to some RGB color. Once you have some code that does something, you can post here for some critique.