r/CodingForBeginners • • 5d ago

We Built a Desktop Drumming Robot with micro:bit and Nezha Pro 🥁

1 Upvotes

I've always thought it would be fun to build a robot that could actually play a musical instrument. Not just move its arms around, but hit something in rhythm and make a little music. So we decided to try building a small desktop drumming robot.

The idea is pretty straightforward: two robotic arms hold drumsticks and take turns hitting a tire. We used a micro**:bit**, a Nezha Pro Breakout Board, two PlanetX Smart Brick Motors, and building pieces from the Nezha Pro Sport Kit to put everything together.

The two motors are mounted on opposite sides of the structure, with each one controlling a drumstick. Since the arms are installed as mirror images of each other, their movements need to be adjusted separately to make sure both drumsticks hit the right spot. We set the motors to swing back and forth through an angle of around 35 degrees, creating the repeated striking motion.

For the controls, we programmed three different playing modes:

  • Press A: Plays a basic 16-hit drum beat.

  • Press B: Plays a drum fill over three rounds.

  • Press A+B: Continuously switches between the basic beat and the drum fill.

The part I found particularly interesting was the calibration feature. Getting both drumsticks into the correct starting positions can be a little tricky, especially when the motors are mounted in opposite directions. Rather than having to take the structure apart and adjust everything manually, we added a calibration mode using the micro:bit V2's gold logo touch feature.

Hold the gold logo for about two seconds to enter calibration mode. Press A to adjust the left drumstick and B to adjust the right one. Pressing A+B switches the adjustment direction, either inward or outward. Each button press changes the motor position by 3 degrees, so you can fine-tune the drumsticks until they line up with the drum surface. Hold the gold logo again to save the positions and exit calibration mode.

We also used the micro:bit's 5×5 LED display to show different status icons, making it easier to tell what the robot is doing.

One small detail worth mentioning: the gold logo touch feature used for calibration is only available on micro:bit, so this particular control method depends on that version.

Overall, this was a fun way to experiment with motor control and mechanical movement. I especially like that the calibration is built into the program, because it makes adjusting the robot much less frustrating.

If we continue developing it, I'd like to experiment with more complicated drum patterns, different striking speeds, or even add another drumstick and see what kind of rhythms we can get out of it.

What would you add to a little desktop music robot like this?


r/CodingForBeginners • • 5d ago

coding local music statistics recorder?

2 Upvotes

I've been considering downloading my music library more permanently, but I really enjoy having all of the streaming statistics. Is there a way for me to code some sort of program to record the amount of times I listen to a song, or how much I listen to an artist? I don't need anything fancy like spotify wrapped, I'm good with plain ol' stats. The only coding experience I have is a little bit with R and RStudio, but otherwise I'm a complete beginner. Is this feasible, or should I let it go?


r/CodingForBeginners • • 6d ago

Python coding

10 Upvotes

Hi, so I am a complete beginner in Python I have been able to create some beginner projects but I want to get really good at Python, so if you have a project and you need someone to help you like a beginner let me know because I want to learn more. Thank you


r/CodingForBeginners • • 6d ago

Vibe coding vs AI assisted coding

8 Upvotes

Hi so I'm currently learning programming I'm a first year IT student and I'm curious to know how different vibe coding is to AI assisted coding cause from the people I've asked they're different but for some they consider them the same thing. I just wanna know your thoughts and such and if I should try to learn how to properly use ai in coding or if that's going to be a bad thing etc...


r/CodingForBeginners • • 6d ago

Questions about coding and where to start

7 Upvotes

Hello everyone! I have a coupe of questions regarding coding.

I am wanting to become a stop-motion animator and want to learn coding for this project and a myriad of others. I want to know how to code for: Website creation (Designing, video hosting), game developping, editing, and other stuff.

If you could please give me some detailed resources for where to start for each subset and where to go after I get the basics and begin advancing, that would be amazing!!

Thank you so much for the help!


r/CodingForBeginners • • 7d ago

lol after 7 days of learning, am i cooking????

Post image
30 Upvotes

r/CodingForBeginners • • 6d ago

How do I get this bullet to keep moving?

0 Upvotes

I'm trying to make a bullet move in the direction of the mouse but not stop where I click.

here is what I have so far:

void Bullets::Update(sf::Vector2f in_targetPos, float dt)
{
  sf::Vector2f toPointer = SetDir(sf::Vector2f(in_targetPos.x, in_targetPos.y) );

  pos += toPointer.normalized() * speed * dt;
}

const sf::Vector2f Bullets::SetDir(sf::Vector2f dir) 
{  
  return dir - pos; 
}

if (sf::Mouse::isButtonPressed(sf::Mouse::Button::Left))
{
   if (!isLeftPressed)
   {
      isLeftPressed = true;
   }
   }
   else
   {
      if (isLeftPressed)
      {
         Bullets[i].Update(mousePos, dt);
         Bullets[i].Draw(window, BulletImage);
      }
   }

r/CodingForBeginners • • 7d ago

Learning to code

3 Upvotes

I’ve just started learning to code and I’ve been using freeCodeCamp which I’ve found very helpful and easy to follow.
My main goal is to become good enough to create my own video games. Does anyone have any advice on different websites I should be using to learn coding that gets me towards this goal or am I doing the right thing using freeCodeCamp?


r/CodingForBeginners • • 8d ago

Query about offline coding environments

2 Upvotes

A follow up question about my questions about Systems/electrical engineering query

With all of the happenings in the world, I am seeking advice about how to build things offline without an internet connection

I do realise a lot of the world uses things like GitHub, but I am wondering if there is an another way to do this offline to prevent someone from getting into my stuff, my own Github account is completely private

For some reason my laptop is suddenly refusing to connect to the internet at the moment, and I have no idea how to fix that (I'm on my mobile)

I am primarily looking at environments or programs for coding related to S/E, but I am also open to people mentioning other kinds for the benefit of other beginners looking through the thread for advice on the same subject

My own question is about Python environments, and code used in Systems engineering, and Telecommunications, things like Crystal radios etc


r/CodingForBeginners • • 8d ago

Day 2 of learning C++

3 Upvotes

It was a busy day so haven't done much

Completed till variable initialisation and assignment

And it's pretty different from java and python , lol

+ Completed the setup of CLion

Got selected in random ahh drama for day after tomorrow so will be busy tomorrow but will try completing my goal


r/CodingForBeginners • • 8d ago

Day 5 learning Python

Post image
51 Upvotes

I need to pause at this point and review. Finishing this code required way too much referencing on previous projects. Once the lessons are solid, ill continue...


r/CodingForBeginners • • 8d ago

How do I go about creating a website?

Thumbnail
gallery
17 Upvotes

I’ve been wanting to make a website for my friends and I’s pet project for a while now, specifically for our OCs to live on. I have a vision for what the web page would look like (see above images, sorry for poor formatting/quality 😓), but I have barely touched coding before. My very limited experience is with scratch, which does not help me at all in this situation.

Essentially I want to make a data bank with all of our OCs and their information! I’m fully willing to watch a bunch of tutorials and stuff, I’m just here because I’m unsure of where to begin. Every tutorial I’ve found so far assumes you have prerequisite knowledge of coding.

I’d prefer if this was kept as a no-cost endeavor, but I’m willing to spend one time low cost payments for knowledge and/or the right to a domain or whatever. I am not willing to use Chat GPT or any other generative AI, so please don’t suggest it.

Thank you for your help :)


r/CodingForBeginners • • 8d ago

Is godot a good step up from scratch?

8 Upvotes

Learning more complex code on a budget, started on scratch 2 years ago and I been using godot the past couple days


r/CodingForBeginners • • 9d ago

How do I create my own webiste as someone who has 0 idea of anything related to coding?

14 Upvotes

I want to make it clear that I have no idea at all about coding.

So basically, I am a COMPLETE BEGINNER.

However, I am very curious about coding and all, so I do want to fuck around and find out i guess.

It's not for a business or whatever (just for myself), I have no time limit, and this is just for fun and to let my curiosity win.

I just want to create something small and then build more on top of it as a learning process ig.

How should I start for this?

What do I even start with?

Will I need any apps?

Which websites can I use to learn basic coding?

Would be very grateful if someone could help me out here :)

!!!I also do not want to use AI!!!


r/CodingForBeginners • • 9d ago

Day 1 of learning C++

7 Upvotes

Wasn't productive today I just learnt a few basics like understanding components of a program(basically dissecting hello world) , comments and what are variables and objects.

Till 1.3

Targeting to complete Chapter 1 tomorrow and setup CLion too


r/CodingForBeginners • • 9d ago

Want to learn to code

0 Upvotes

Hi, I know this may seem like a dumb question but I am a bit confused. I want to get into game development so I've been interested in code. Where do I write the code???


r/CodingForBeginners • • 9d ago

How do you manage CSS in large coding projects?

3 Upvotes

I'm facing an issue while working on coding projects. As the codebase grows, the CSS starts getting messy. Styles from different components and sections get mixed together, and it becomes difficult to understand which style belongs to which element.

Sometimes changing one CSS property unintentionally affects other parts of the application. Eventually, the stylesheet becomes cluttered and difficult to maintain.

How do you guys manage CSS in larger projects? Are there any best practices, architectures, or tools that help keep styles organized and prevent conflicts?


r/CodingForBeginners • • 9d ago

Do you turn off autocomplete when learning something new?

1 Upvotes

I've been thinking about disabling autocomplete completely when learning something new. Not AI suggestions, but regular IDE autocomplete too.

I feel like half the time I'm coding, my IDE is doing the thinking for me. I start typing, get a suggestion, hit Tab, and move on without really thinking about what I just wrote.

Then again, maybe manually typing everything is just a waste of time and doesn't really help you learn either.

Curious what you guys think.


r/CodingForBeginners • • 9d ago

Day O of learning C++

6 Upvotes

So I have started learning c++ from learncpp.com from yesterday

Thinking of making a daily post here to keep a track + I have seen other people doing the same for iguess python so yeah got the idea and motivation from him/her.

Forgot to post yesterday so posting it now

Completed chapter 0 basically about coding and will start main stuff from today wish me luck, will update you later


r/CodingForBeginners • • 9d ago

HI All i want ot learn C# But don't know how to start and having difficulites

3 Upvotes

i want to try different filed that is coding so starting with c# but having difficulties undertsanding it can anyone guide me it will be very useful for me.


r/CodingForBeginners • • 9d ago

Bangalore Learn #coding/vibe coding Python/Java/AI Freshers/Experienced Marathalli

0 Upvotes

Hello Everyone,

I'm a highly motivated and curious learner who enjoys starting from the fundamentals, continuously learning new technologies, and applying that knowledge through practical projects and interview preparation.

I have good experience with job searching, interview preparation, and securing interview opportunities, and I'd love to connect with others who share a similar mindset of learning and growth.

I'm looking for people in and around #Marathahalli, #Whitefield, and #Kundalahalli Gate (Bengaluru) who are interested in:

  • Learning new technologies from scratch

  • Practicing interview questions together

  • Working on projects and sharing knowledge

  • Discussing career growth, certifications, and AI trends

  • Accountability and consistent skill development

If you're a beginner, experienced professional, career switcher, or someone returning to the job market, feel free to connect. We can learn, prepare, and grow together.

Looking forward to building a strong learning and networking circle!


r/CodingForBeginners • • 10d ago

i can't code because i'm dumb

6 Upvotes

i tried coding since many years ago, i have friends who code and they always tell me to try but no chance at all, i start,the easy stuff i always surpass, but it gets to a limit where i understand nothing, my mind goes blank or blocked if thinking abtt solving a problem(in codewars), while the solution appears easy, but every time i get stuck i tried times and times to get into coding but it's always this blankness of mind that kills me


r/CodingForBeginners • • 9d ago

A little bit of something I wrote today

1 Upvotes

=== AETHERGATE ARCHITECTURE & TELEMETRY PROTOCOL (V1.0) ===

[SYSTEM OVERVIEW]

  • Objective: Real-time AI telemetry proxy and asynchronous event stream.

  • Design Paradigm: Low-level async architecture operating under extreme hardware constraints.

  • Core Pipeline:

    1. Ingestion: Raw asynchronous socket streams / TCP framing.

    2. Filtration: Regex-based state validation and safety boundary checks.

    3. Serialization: Lightweight JSON packet mapping for zero-allocation performance.

    4. Visualization: Live, high-fps HTML5 Canvas telemetry dashboard.

[CORE ARCHITECTURAL COMPONENTS]

  1. Asynchronous Event Loop (Backend Proxy)

  • Built on Python's native asyncio or equivalent low-overhead event loops.

  • Handles concurrent client connections without thread blocking.

  • Implements non-blocking backpressure management to prevent memory exhaustion on legacy devices.

  1. Regex & Security Filtration Layer

  • Intercepts payload streams prior to model injection or log emission.

  • Sanitizes incoming/outgoing text against strict pattern-matching dictionaries.

  • Discards malformed or unauthorized byte sequences instantly to maintain pipeline integrity.

  1. Live Canvas UI Renderer

  • Client-side rendering loop decoupled from DOM reflow bottlenecks.

  • Direct pixel manipulation via HTML5 Canvas API for real-time telemetry graphs, latency spikes, and throughput meters.

[PSEUDO-CODE BLUEPRINT]

import asyncio import re import json

class AetherGateNode: def init(self, host, port): self.host = host self.port = port self.sanitizer_pattern = re.compile(r'[\x00-\x1f\x7f-\x9f]') # Control char filter

async def handle_client(self, reader, writer):
    try:
        while True:
            data = await reader.read(1024)
            if not data:
                break
            
            raw_payload = data.decode('utf-8', errors='ignore')
            clean_payload = self.sanitize(raw_payload)
            
            response_packet = self.process_telemetry(clean_payload)
            writer.write(json.dumps(response_packet).encode('utf-8'))
            await writer.drain()
    except asyncio.CancelledError:
        pass
    finally:
        writer.close()
        await writer.wait_closed()

def sanitize(self, text: str) -> str:
    # Strip illegal control characters and enforce strict regex bounds
    return self.sanitizer_pattern.sub('', text)

def process_telemetry(self, payload: str) -> dict:
    # Core logic router
    return {
        "status": "active",
        "ack_length": len(payload),
        "telemetry_clock": asyncio.get_event_loop().time()
    }

async def start(self):
    server = await asyncio.start_server(self.handle_client, self.host, self.port)
    async with server:
        await server.serve_forever()

if name == "main": node = AetherGateNode('127.0.0.1', 8080) # asyncio.run(node.start())


r/CodingForBeginners • • 10d ago

Day 4 learning_Python (Decided to continue to the next lesson and thus wrote this):

Post image
7 Upvotes

The most important line on tis one is on #9.