#Arduino C programming
Explore tagged Tumblr posts
every-crocodiles-dad · 4 months ago
Text
Desperately trying to find the tech AV/robotics/coding community of tumblr.
WHERE ARE YOU. PLEASE. GIVE ME LIFE. HEAR MY HASHTAGS AND FIND ME.
10 notes · View notes
allie-leth · 3 months ago
Text
My worker firmware works! It flashed itself over, now just to add some roll back, security, and validation features. But effectively this means I never have to plug in another ESP32 to send them firmware. I can just tell them to post to MQTT from the worker firmware for logging and post the firmware binary to my local file server. This makes my life so much easier while building out this mesh of meshes multi-protocol com lib. Hell yeahhh
7 notes · View notes
spark-hearts2 · 4 months ago
Text
Just finished making a circuit diagram in Fritzing and I don’t know if I’m doing it wrong or something because it was pretty annoying to put together.
Tumblr media
This is the diagram that I made, really simple yet it took me a while. It wasn’t hard to find the parts that I wanted to add, but the controls for moving them around were simply annoying to use. Not to mention the weird zoom in/out controls. For some reason I couldn’t use the touchpad to zoom out? Only zoom in? Idk, I’ll make another post if it gets better with use.
If you want to see my circuits homework for whatever reason, it’s under the cut.
Here’s a video of the circuit in question working in real life. The goal is to make the light turn off for two seconds only after the button is released. LED is in series with a 100 ohm resistor just to make sure it doesn’t burn out (and to make it a little less painful on the eyes). Button is wired in a pulldown resistor setup (the detector is after the button) with a 10k resistor. This is so that when the button is pressed, the value reads as high.
Tumblr media
This is the C++ code that is running on the Arduino uno. It just uses an If else statement to control the state of the LED according to the button. Read the comments (grey text) for a short explanation of what each line does. If you want a more in depth explanation uhh message me I guess.
9 notes · View notes
i-wanna-b-yours · 2 months ago
Text
SOMEONE GIVE ME A BLOODY INTERNSHIP 😭
2 notes · View notes
hyper-lynx · 2 years ago
Note
Hey you’re a programmer, I need to learn how C/C#/Arduino works ASAP for a project.
Are there any decent resources you know about? I’ve only worked in Java before, and am getting really confused by what is going on with Structures and just all the stuff C does
If you block the ads W3Schools is decent IMO for learning a lot of programming languages.
You should also look at the Arduino reference page to learn how that device specifically works.
Now for some vague summaries:
C is not object oriented like Java is so there is no way to have classes. Instead, C programmers store data in arrays and structures (which are pretty much just the data part of an object), and the program is split amongst a lot of functions.
Pointers are also an important C concept; they are covered in the W3Schools tutorial but basically they are just a memory address you can use to look up other things. If you want to make things like linked lists in C, you will be using these. Even arrays are technically pointers.
C#, meanwhile, is much closer to Java in terms of how you'd use it.
12 notes · View notes
Text
Should I actually make meaningful posts? Like maybe a few series of computer science related topics?
I would have to contemplate format, but I would take suggestions for topics, try and compile learning resources, subtopics to learn and practice problems
4 notes · View notes
wolfhowls · 9 months ago
Text
Arduino Pro Micro gear shifter (for ETS2/ATS)
Here's the source code of a quick and dirty emulator for 16 gears shifter (originally from MAN trucks) adapted to Logitech G-27 shifter/USB.
/*-------------------------------------------------- Sample code by Matthew Heironimus https://github.com/MHeironimus/ArduinoJoystickLibrary 2016-11-24 Gear shifter for MAN lever and ETS2/ATS mod by Genxha https://wolfhowls.tumblr.com/ Wiring: Lever wire > Pro Micro Pin Upper (round) button (Emulated X button index 3 joy 4) Blue > GND Yellow > 5 Side selector (Emulated B button Index 2 joy 3) Violet > 4 Green > GND Lower selector (Emulated A button - both positions index 0, 1 joy 1, 2) White > GND Red > 3 Blue* > 2 <---- Note: solder a spare wire between center position of lower selector to pin 2 -----------------------------------------------*/ #include Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID, JOYSTICK_TYPE_GAMEPAD, 4, 0, // Button Count, Hat Switch Count false, false, false, // X and Y, but no Z Axis false, false, false, // No Rx, Ry, or Rz false, false, // No rudder or throttle false, false, false); // No accelerator, brake, or steering void setup() { // Initialize Button Pins for (int index = 0; index < 4; index++) { int pin = index + 2; pinMode(pin, INPUT_PULLUP); } Joystick.begin(); // Initialize for (int index = 0; index < 4; index++) { // Reset Joystick.setButton(index, !digitalRead(index + 2)); } } void loop() { int lastButtonState[4]; for (int index = 0; index < 4; index++) { // read and set initial button status lastButtonState[index] = digitalRead(index + 2); } /* Main FOR loop */ for (int index = 0; index < 4; index++) { // read button status and send joystick events int pin = index +2; int currentButtonState = !digitalRead(pin); if (currentButtonState != lastButtonState[index]) { Joystick.setButton(index, currentButtonState); lastButtonState[index] = currentButtonState; } } }
0 notes
machinelearningsite · 1 year ago
Text
Understanding Arduino Timer Interrupts with Example Code
Learn about timer interrupts in Arduino and their importance in real-time applications. Get practical examples and code snippets for precise, realtime timing solutions.
Arduinos are used in many IoT applications. From blinking LEDs to measuring the angular velocity of a wheel, Arduino is the microcontroller of choice not only for professional developers, but also for beginners who can use the board as a programming playground. Now there are projects where timing is everything. Real-time applications are systems that require a timely response to external events.…
Tumblr media
View On WordPress
0 notes
incogninto1-1 · 1 year ago
Text
Tumblr media
And so it begins. I managed to get the UART TX driver working for my ATMega328P and now it is showing the boot log of the prototype OS kernel that I am working on codenamed RNLOU (WIP)
0 notes
ayeforscotland · 1 year ago
Text
Ad | Some Humble Bundle Goodies
One for the audio engineers - The Audio Arcade bundle gives you a whole bunch of royalty-free music and SFX as well as plugins to insert in all the major game engines. Ambient tracks, environmental sounds, explosions, you name it.
Money raised goes towards Children's Miracle Network Hospitals.
For those who dabble in Virtual Reality, the Upload VR Showcase with Devolver Digital has a bunch of Serious Sam VR games as well as the Talos Principle, a really solid puzzle game.
Money raised goes to Special Effect which helps people with disabilities enjoy games via accessible controllers. I've seen the stuff they do and it's honestly great.
Want to get into programming but don't know where to start? The Learn to Program bundle has a tonne of resources covering everything from HTML and CSS through to Python, C# and Ruby.
Money raised goes towards Code.org which seeks to expand participation in computing science by helping women and students of colour.
The Future Tech Innovators Toolkit is a software bundle with courses on Robotics, Electronics and programming with Raspberry Pi and Arduino.
Money raised goes towards Alzheimers Research UK.
The Home How-To Guides bundle offers a complete set of books for home improvements and projects. Want to know more about plumbing, home repair, bathrooms, wiring or carpentry? This bundle has you covered.
Money raised goes to It Gets Better, a charity that supports LGBT Youth.
Want to pick up the latest Elden Ring DLC? It's also available on the Humble Store with the key being redeemable on Steam.
105 notes · View notes
utopicwork · 4 months ago
Note
Hi, I'm a junior in university right now working towards my bachelor's in electrical engineering and I've since realized I have no idea wtf I'm doing. Do you have some resources on how to begin designing electric circuits and programming in C? You seem like you know what you're doing
So I've thought about this a good bit and what helped me learn both times was hands on practice so I'd see about getting a cheap breadboard kit like this:
But probably not this one exactly, you can get something similar for way cheaper.
As for specific literature for circuitry I don't have a recommendation but I can recommend picking varying difficulties of diy projects that require circuitry at the beginning to get comfortable and bringing that comfortability to your school projects.
For using C with circuitry I'll say the best path is definitely buying a cheap esp32 board, something based on the c3 would probably be cheapest. There is tons of documentation on how to use these boards and I've found that PlatformIO + VS code/vscodium is a very good setup for programming these boards.
19 notes · View notes
mechanical-cowboy · 2 months ago
Text
Me: I'm new to programming but have the basics down in Python, Java, Visual basic, C#, arduino and PHP
Uni I'm about to go to: We use C++
Me: Okay, let me just have a little look and- WHAT THE FUCK IS THAT????
Me: Take me back to python you bastards ;-;
8 notes · View notes
spark-hearts2 · 4 months ago
Text
I AM SO GOOD AT CIRCUIT BUILDING AND PROGRAMMING RAAAAA
C++ script under cut :3
int UpDown;       //value for the Y direction of controller
int LeftRight;    //value for the x direction of controller
int LR_neutral;   //value for the 0 position in the y direction of controller
int UD_neutral;   //value for the 0 position in the x direction of controller
int Bprev;        //value for button edge detection
int Bcurr;        //value for button edge detection
int R;
int Y;
int G;
int B;
void setup() {
  Serial.begin(9600);  //begin communication
  pinMode(A2,  INPUT); //button press detection
  pinMode(4, OUTPUT); //set pin 4 to power the Red LED
  pinMode(5, OUTPUT); //set pin 5 to power the Yellow LED
  pinMode(6, OUTPUT); //set pin 6 to power the Blue LED
  pinMode(7, OUTPUT); //set pin 7 to power the Green LED
  LR_neutral = analogRead(A1); //set zero position of controller
  UD_neutral = analogRead(A0); //set zero position of controller
  //WARNING!!! YOU CAN NOT TOUCH CONTROLER WHEN INITALIZATION HAPPENS!!!! WILL MESS CONTROLLER UP
}
void loop() {
LeftRight = analogRead(A0);  //read X position of controller
UpDown = analogRead(A1);     //read y position of controller
Bprev = Bcurr;               //set current button state to previous state
Bcurr = analogRead(A2);     //set current button state equal to actual button state
if ((Bprev == 0) && (Bcurr > 0)){
  //turns all LED on
  digitalWrite(4,HIGH);
  digitalWrite(5,HIGH);
  digitalWrite(6,HIGH);
  digitalWrite (7,HIGH);
  delay(100); //wait
  //turns all LED off
  digitalWrite (4,LOW);
  digitalWrite (5,LOW);
  digitalWrite (6,LOW);
  digitalWrite (7,LOW);
}
if (UpDown >= UD_neutral) {  // checks if controller is up
  B = 0; //if up turns blue LED off
  R = map(UpDown, UD_neutral,1023,0,255);  //if up turns red LED on
}
else {
  R = 0;  //if down turns red LED off
  B = map(UpDown, UD_neutral,0,0,255); //if down turns blue LED on
}
if (LeftRight >= LR_neutral) {  // checks if controller is right
  G = 0;  //if right turns green LED off
  Y = map(LeftRight, LR_neutral, 1023,0,255); //if right turns yellow LED on
}
else {
  Y = 0; //if left turns yellow off
  G = map(LeftRight, LR_neutral, 0,0,255); //if left turns green on
}
//writes values to LEDs
analogWrite(4,R);
analogWrite(5,Y);
analogWrite(6,B);
analogWrite (7,G);
}
5 notes · View notes
ziekkfreak2-0 · 3 months ago
Text
On one hand, I hate my robotics teacher for teaching us the same lesson on python loops we've been learning for half the damn school year, then expecting us to make an innovative robot in 3 weeks when arduino is based on C++.
I was gonna counter that with something else, but as I wrote it I realized just how stupid it actually is. Fuck it. Venting time.
NO CUZ I CAN'T UNDERSTAND THIS GUY. WDYM "Programming's easy! You learn the basics, and from there you make your own solutions." ??? That's not verbatim but. STILL.
I'll give him a bit of credit, he taught us the basics of arduino. The proper syntax, loops, variables, functions, motor control, sensors, etc. But for god's sake, that limited pool of knowledge can only get you enough to make a mini car! It would've been nice to learn about fading LEDs, integer overflow, pointers vs the actual value in a variable, OR EVEN WHAT DOCUMENTATION IS. YEAH. DOCUMENTATION. THE LITERAL OFFICIAL EXPLANATION FOR KEY FEATURES IN PROGRAMMING LANGUAGES.
But suddenly its OUR fault our code doesn't work because "I taught you the basics. If you don't understand, that means you're not listening during my classes." MAYBE IF YOU STOPPED TEACHING US WHAT A FUCKING FOR LOOP IS, WE'D HAVE A REASON TO LISTEN. Majority of my understanding of robotics are a product of self study and receiving help from my family and their long list of IT contacts.
Not only that, HE is the one that approves of our robotics projects. If YOUR students can't complete the project YOU personally approved of, isn't that an error on your part? You should know what your students are capable of making. You should know because they should only know WHAT YOU TEACH THEM. So surprise surprise when your students feel like they're forced to hire people to do their projects, all because of your failure to teach them the skills they needed to do it themselves.
The only people getting a passing grade in this class are gonna be those that are either rich or have a lot of contacts. What a fucking joke.
And don't be mistaken, this is NOT the complaint of someone who doesn't understand programming. I consistently get 90% and above on his exams and do coding for fun. I'm complaining on behalf of my classmates who weren't as lucky as me, in that I have way more people to ask help from.
"100% working by this week" my ass. Actually teach us something relevant for once.
4 notes · View notes
nitte-university-blog · 6 months ago
Text
Essential Skills Every Electronics Engineer Should Master
Electronics engineering is an exciting and constantly evolving field. With new technologies emerging every day, the need for skilled professionals has never been greater. If you're pursuing a B Tech in Electrical and Electronics Engineering or exploring options at B Tech colleges for Electrical and Electronics, it's crucial to know which skills can set you apart in this competitive domain.
Let’s dive into the essential skills every aspiring electronics engineer should master.
Strong Foundation in Circuit Design
Circuit design is at the heart of electronics engineering. Understanding how to create, analyze, and optimize circuits is a must-have skill. Whether you’re designing a simple resistor network or a complex integrated circuit, mastering tools like SPICE and PCB design software can make your designs efficient and innovative.
Programming Proficiency
Electronics and programming often go hand in hand. Languages like Python, C, and MATLAB are widely used to simulate electronic systems, automate processes, and even build firmware for devices. Engineers proficient in programming can troubleshoot problems effectively and add versatility to their skill set.
Knowledge of Embedded Systems
Embedded systems are everywhere—from your smartphone to your washing machine. As an electronics engineer, understanding microcontrollers, sensors, and actuators is crucial for creating devices that work seamlessly in our daily lives. Hands-on experience with platforms like Arduino and Raspberry Pi can be a great way to start.
Problem-Solving and Analytical Thinking
Electronics engineers often face unique challenges, such as debugging faulty circuits or improving system performance. Strong problem-solving and analytical thinking skills help them identify issues quickly and find effective solutions. To cultivate these skills, tackle real-world projects during your coursework or internships.
Familiarity with Power Systems
As the world moves toward renewable energy and smart grids, knowledge of power systems is becoming increasingly important. Engineers in this field should understand how electrical power is generated, transmitted, and distributed and how to design energy-efficient systems.
Effective Communication Skills
Electronics engineering often involves working in teams with other engineers, designers, or clients. Communicating your ideas clearly—whether through reports, presentations, or technical drawings—is just as important as your technical skills. Strong communication ensures that your brilliant ideas come to life effectively.
Adaptability to New Technologies
Technology evolves rapidly, and staying updated is essential for electronics engineers. Whether you’re learning about IoT (Internet of Things), AI integration, or 5G communication, an adaptable mindset will ensure you remain relevant and capable of tackling emerging challenges.
Hands-On Experience
While theoretical knowledge is important, nothing beats practical experience. Participating in labs, internships, or personal projects gives you the opportunity to apply what you’ve learned and develop confidence in your skills. Employers often value hands-on experience as much as your academic achievements.
Preparing for Success in Electronics Engineering
Pursuing a B Tech in Electrical and Electronics Engineering is the first step toward mastering these skills. The best B Tech colleges for Electrical and Electronics not only provide a strong academic foundation but also opportunities for practical learning and industry exposure. By focusing on the skills mentioned above, you can position yourself as a competent and innovative engineer ready to tackle real-world challenges.
4 notes · View notes
purpurussy · 3 months ago
Note
THANK YOU so much for that detailed explanation. I have taken and had to pass/fail 😅 1 CS class (python) in undergrad and am hopeless so the details were very needed. I’m curious: are u software engineers or in the CS field?? Anyways thanks again i’ll try and play around with it and follow ur guide when work is being less insane :)) <3 Also got around to actually reading your fic and it’s sooo good eager for more whenever u post ! Have a blessed day.
aw I'm glad it was helpful! you can always ask more questions if anything is unclear.
I study industrial design, I took a few python classes a few years ago (mainly for data analysis). but I had a real long-term special interest in tech and computers (and video games lol) when I was a teenager, so that's when I first got into programming. I feel most comfortable in python, but I've learned a bit of c# for making games in unity, and obviously I've dipped my toes into CSS as well. oh and I've done some robotics projects with an Arduino (based on c++). i did consider studying CS but couldn't cope with a 100% stem degree without any "creative"/artsy elements lmao I don't have what it takes to be a phannie in stem
I'm really glad you're enjoying my fic!! thank you for checking it out. hope you have a great day too <3
4 notes · View notes