moose-mousse - Electronic Moose
Electronic Moose

Helloooo! I am Moose! They/Them/He/Him I am a embedded software engineer with autism, depression and anxiaty ( Wooo! ). I post about... whatever I want... software things, mental health things... whatever I feel like Feel very wellcome to send me asks about... anything that strikes your fancy :3

266 posts

It Works!*

It works!*

So I (FINALLY) put the final touches on the software for my robot PROTO! (Listen, I am a software person, not a coming-up-with-names person)

It Works!*

Basically, it is a ESP32 running him. He takes HTTP messages. Either GET odometry, or PUT twist. Both just being a string containing comma separated numbers

Odometry is the robots best guess based on internal sensors where it is (Since PROTO uses stepper motors, which rotates in tiny tiny steps... it is basically counting the steps each motor takes)

Twist is speed, both in x,y and z directions, and speed in angular directions (pitch, roll and yaw). This is used to tell the robot how to move

It Works!*

Now, since PROTO is a robot on two wheels, with a third free-running ball ahead of him, he cannot slide to the side, or go straight up in the air. You can TRY telling him to do that, but he will not understand what you mean. Same with angular movement. PROTO can turn left or right, but he have no clue what you mean if you tell him to bend forward, or roll over.

The software is layered (Which I use a BDD diagram to plan. I love diagrams!)

It Works!*

Basically PROTO gets a twist command and hands that over to the Differential_Movement_Model layer.

The Differential_Movement_Model layer translate that to linear momentum (how much to move forward and backwards) and angular momentum (how much to turn left or right). combines them, and orders each wheel to move so and so fast via the Stepper_Motors layer.

The Stepper_Motors turns the wanted speed, into how many steps each stepper motor will have to do per second, and makes sure that the wanted speed can be achieved by the motors. It also makes sure that the wheels turn the right way, no matter how they are mounted (In PROTO's case, if both wheels turn clockwise, the right wheel is going forward, and the left backwards.). It then sends this steps per second request down to the Peripheral_Hub layer.

The Peripheral_Hub layer is just a hub... as the name implies, it calls the needed driver functions to turn off/on pins, have timers count steps and run a PWM (Pulse-width modulation. It sends pulses of a particular size at a specific frequency) signal to the driver boards.

Layering it, also means it is a lot easer to test a layer. Basically, if I want to test, I change 1 variable in the build files and a mock layer is build underneath whatever layer I want to test.

So if I want to test the Stepper_Motors layer, I have a mock Peripheral_Hub layer, so if there are errors in the Peripheral_Hub layer, these do not show up when I am testing the stepper motor layer.

The HTTP server part is basically a standard ESP32 example server, where I have removed all the HTTP call handlers, and made my own 2 instead. Done done.

So since the software works... of course I am immediately having hardware problems. The stepper motors are not NEARLY as strong as they need to be... have to figure something out... maybe they are not getting the power they need... or I need smaller wheels... or I will have to buy a gearbox to make them slower but stronger... in which case I should proberbly also fix the freaking cannot-change-the-micro-stepping problem with the driver boards, since otherwise PROTO will go from a max speed of 0.3 meters per second, to most likely 0.06 meters per second which... is... a bit slow...

But software works! And PROTO can happily move his wheels and pretend he is driving somewhere when on his maintenance stand (Yes. it LOOKS like 2 empty cardboard boxes, but I am telling you it is a maintenance stand... since it sounds a lot better :p )

I have gone over everything really quickly in this post... if someone wants me to cover a part of PROTO, just comment which one, and I will most likely do it (I have lost all sense of which parts of this project is interesting to people who are not doing the project)

  • sweetpoetrygladiator
    sweetpoetrygladiator liked this · 1 year ago
  • trans9000
    trans9000 reblogged this · 1 year ago
  • trans9000
    trans9000 liked this · 1 year ago
  • hydralisk98
    hydralisk98 liked this · 1 year ago
  • koecode
    koecode reblogged this · 1 year ago
  • f69f96
    f69f96 liked this · 1 year ago
  • scgascart
    scgascart liked this · 1 year ago
  • miquerinus
    miquerinus liked this · 1 year ago
  • who-are-we-to-change
    who-are-we-to-change liked this · 1 year ago
  • ourephemeraluniverse
    ourephemeraluniverse liked this · 1 year ago
  • skylarlilith
    skylarlilith liked this · 1 year ago
  • lqvhss
    lqvhss liked this · 1 year ago
  • umibunn
    umibunn liked this · 1 year ago
  • soupy-bastard
    soupy-bastard liked this · 1 year ago
  • soaked-in-starlight
    soaked-in-starlight liked this · 1 year ago
  • totomouse
    totomouse liked this · 1 year ago
  • silk-sheet
    silk-sheet liked this · 1 year ago
  • dannimalslol
    dannimalslol liked this · 1 year ago
  • rklek
    rklek liked this · 1 year ago
  • hello-trainman99
    hello-trainman99 liked this · 1 year ago
  • xxsneep-snorpxx
    xxsneep-snorpxx liked this · 1 year ago
  • 1997nikeairs
    1997nikeairs liked this · 1 year ago
  • bethblo
    bethblo liked this · 1 year ago
  • magnificentcreatorexpertathlete
    magnificentcreatorexpertathlete liked this · 1 year ago
  • orange-lover
    orange-lover liked this · 1 year ago
  • the-42nd-fish
    the-42nd-fish liked this · 1 year ago
  • chasentail
    chasentail liked this · 1 year ago
  • zohohaz
    zohohaz liked this · 1 year ago
  • akaddouble
    akaddouble liked this · 1 year ago
  • winryrockbellwannabe
    winryrockbellwannabe liked this · 1 year ago
  • acute-acatalepsy-blog
    acute-acatalepsy-blog liked this · 1 year ago
  • lilydaelf
    lilydaelf liked this · 1 year ago
  • xr-k
    xr-k reblogged this · 1 year ago
  • xr-k
    xr-k liked this · 1 year ago
  • toastyraccoon
    toastyraccoon liked this · 1 year ago
  • asvionyaa
    asvionyaa liked this · 1 year ago
  • volcanicallyfeels
    volcanicallyfeels liked this · 1 year ago
  • su-andherpileof-thoughts
    su-andherpileof-thoughts liked this · 1 year ago
  • coldstrawberrytrash
    coldstrawberrytrash liked this · 1 year ago
  • wobinbug
    wobinbug liked this · 1 year ago
  • add-to-none
    add-to-none liked this · 1 year ago

More Posts from Moose-mousse

1 year ago

Vocalization of your thoughts can help you solve problems. In the same way that writing them up or making a diagram of the problem can help you fix it. Try tricks people recomend, and if they work for you. Great! Use them! Here is my duck by the way :3

Vocalization Of Your Thoughts Can Help You Solve Problems. In The Same Way That Writing Them Up Or Making

He is so sassy!

Source For More Posts Like This, CLICK HERE To Follow Ultrafacts

Source For more posts like this, CLICK HERE to follow Ultrafacts


Tags :
1 year ago

If you do ANY C++, You need to watch Jason Turners!

Oh my god, I just realized I have never plugged Jason Turners youtube channel on this blog!!! This must immediately be remedied!

C++ Weekly With Jason Turner
YouTube
Making C++ Fun and Accessible.

Not only is this man VERY easy to listen to, and give great examples of everything he talks about, from super basic begginer concepts and up to stuff about how C++ compilers decide what template classes to implement for any given use of the function. Can only be recommended. It is FACINATING how all the tiny details of C++ clicks and pops, and make that glorus optimized, and smooth machine that is C++ run. Love it


Tags :
1 year ago

What to do when you spot a broken website

I am a very firm believer in either sticking to your principles or update them.

So when I got this error while I tried to search for C/C++ on my national job portal:

What To Do When You Spot A Broken Website

My first thought was "Huh, that is sorta funny" (especially since the code to show me the email address to report this error to was ALSO broken... meaning that whoever made the code that should run if the website broke... never tested it). And then I realized what I was looking at.

And at that point I think I had a ethical duty to notify people to get this fixed. FAST. Why?

It comes under "You are responsible for your choices". With it being understood that doing nothing is also a choice, and that taking a job where you work for, and help a company with doing evil is NOT a choice, if that is the only job you could get (IE, you did not have the power/money/mental health/time to make a choice)

It is now fixed*, so I wanted to make this post for all in the little codeblr community doing any front-end work. Web or not. With 3 lessons to learn from this.

First thing to get from this: "Everyone makes mistakes". This is one of the reason good code is not code without errors. It is code where it is easy to make changes and fix errors. You then try to find as many errors as you can with code reviews, automated testing, having a work environment that does not punish human errors( which encourages people to HIDE errors ) and so on.

Second thing: "Sanitize your user input. Always". Write code that assumes that every single user wants nothing more than to break your code and exploit its vulnerabilities.

This had NOT been done here. This error shows that characters in the string that was made from my search terms, was being run as code. As in, I, or anyone else, could run code in the middle of this javascript code. Meaning it is possible that someone could write code as part of their search that would make the javascript code do... whatever they wanted to. Including deleting the entire backend database. Or steal the info. This is why you ALWAYS sanitize your user input. Basically encode all potentially dangerous characters as something else while working on them. There are libraries like validator.js and express-validator that will do it for you, if you use javascript.

And the third thing. "Do NOT investigate further" . As soon as you confirm that your user input gets treated as code, you contact whoever is running it. If they do not take the threat seriously and it is still there after a week or two, contact established press with this info. You may read about so called grey hat hackers, who unlike black hat hackers(who is people wishing to do harm) or white hat hackers(Who are hired to try to break into a companies software to test it), are trying to find security flaws with good intentions, but are unaffiliated with whoevers code they are trying to break into. In an ideal world, doing that, and then contacting the company, SHOULD result in the company thanking them . But often it also leads to the company suing. And winning. Since breaking in to show that it is possible, is technically still breaking in. So do NOT start testing what you are able to do with the exploit you found. Report it to them, and check a weeks time later if it is fixed. If it keeps being vulnerable, contact the press. The site fixed this error after half a week. But they did it, not by encoding the dangerous characters into something else, but to simply remove them all from the user input string. Meaning that I still cannot search for "C++". Now I just get any job that contains the letter "C"... I mean... it is better... So if you take user input, and it does not brick your code in dangerous ways. You are doing better than whoever coded this for the Danish State :p


Tags :
1 year ago

I finally switched to firefox and I've seen a lot of posts about the effortless importing of preferences from chrome and how it's important to support non-chromium platforms, but nobody is talking about the loss of productivity that happens when beautiful women come to your house to kiss you on the mouth because they heard you use firefox now. nobody's talking about this

1 year ago

These are just... Great and helpful. Things are usually not quite as dire in the EU, but frankly... that just means the red flags are more red. I took my apprenticeship in a small company without pay (Still got state support for education) and I regretted it. It meant that the company was super ok with giving me unimportant and unrelated work, or not enough to do. Free labor could not be wasted. So I did not get nearly as much precious experience from it as I could have. I compensated plenty for that with study and personal projects, but it was still a mistake.

How to Get Into Engineering & Survive - Real-Ass Tips From an Aggressively Anticapitalist Queer Chick

I thought I'd share some of my engineering / tech job tips - especially since a few of my nerd posts blew up and it looks like so many of y'all in my notes are trying to get into the field.

As a queer woman, it can be a lot to navigate. Plus having parents with blue collar jobs? A whole nother level of having to figure shit out.

Honestly after writing this, I think this applies to more than just engineering. If you're the first one in your family to get a white collar job, I think this stuff applies too!

LOOKING FOR A FIRST JOB:

Don't worry if you don't get a dream job right outta college, it's OK to get something to just pay the bills while you interview look for something better. Don't worry about "company loyalty" - these companies will have no loyalty to you either.

Join mentorship organizations in college, it's a lifesaver to be able to get advice from experienced people. I totally recommend the Society of Women Engineers / Women In CS for us girls.

Go to career fairs and some internships in college. Getting a job is just as much about who you know as what you know. Sure, get the diploma, try and get good grades, but the connections you make interning will help you more than any personal project or 4.0 GPA. Especially if you're a first gen college student.

Don't take unpaid internships, they're such a scam and the companies offering them are not ones you want to touch with a 10-ft pole. But do interview for them, they're great mock-interviews and its fun to decline their offers.

LOOKING FOR A JOB IN GENERAL:

Apply for any job that looks interesting, even if you don't think you qualify. You realize after some time in the industry that these job postings are basically like "We're looking for a unicorn, with the budget for a donkey" I don't think I've ever gotten a job where I met more than half of the "requirements" on the job description when I was hired.

The best time to look for a new job is when you already have a job. (Real fuckin helpful, I know) So if you can help it, don't quit a job without lining another up.

Applying for a job through one of those online application forms? It's a pain in the ass and your resume is likely to get ignored. Instead, if you can, get a personal referral from an employee. But that's hard to do especially if you're trying to break into the industry.

So another approach is to look up the company on LinkedIn, look through their employees until you find someone with the job title "recruiter", and send them your resume with a polite note expressing interest in their company. Their whole job is to find people to hire and they use LinkedIn to do that. You'll basically cut the line.

Don't work with recruiters from external recruiting agencies. Agency recruiters take a commission, and most companies will reduce your salary offer to compensate for that commission. If you got a message from an external recruiter, and it's a job you want, see the above bullet point.

Make a LinkedIn and keep your status as open to work, constantly. Recruiters will come to you, especially after you've gotten a couple years of experience. And it's always nice to have an inbox full of choices even if you're not actively looking. This will also help you get an idea if you're underpaid at work, if you're being recruited for much higher paid positions.

If you can go into interviews with the mindset of needing to be convinced to work for a company rather than eager to start, you'll be shocked what they can find in the budget to convince you with. I like to take interviews occasionally, even if I like my job, just to see what companies will come up with to convince someone who loves their job to come work for them.

HOW TO DODGE A BULLET

I'm going to be blunt - a lot of engineering companies suck ass to work for. And not just regular ass, I'm talking hairy swamp ass. Especially if you're a woman, queer, or not white. It's like some of these companies mixed up the "protected classes" list and the "fun people to haze" list. Learning how to background check a company is important part of this career.

I like to try talk to ex-employees off the record before I have my first interview with a company. Ask around your professional mentorship groups, work friends, or even DM people on LinkedIn who have the company as a past job.

When you have these chats, don't do it in writing. That way you can ask the hard questions about harassment, bigotry, racism, pay and pay equity, etc that you won't get a straight answer about in a job interview. Try not to only talk to straight white guys, they're often blind to the issues that other people in the industry face.

Also, if you want to avoid doing military contract work, know that many employers with military contracts are not at all transparent about it, even in the job posting or during the interview process. You can end up at a job that was pitched as something else to you, and be told to do military work once you're there. Ask your interviewer how much of the company's revenue is coming from the commercial space versus the defense space, or learn how to read between the lines in job postings.

(Continued beyond the readmore since I don't want to create the ~do you love the colors of the sky~ of text posts

JOB INTERVIEW PREP

Of course you have to be technically qualified to land a job, but I'm not about to try and give a whole engineering degree in a tumblr.com post. So I'm going to assume you've got the degree and maybe some job experience, and focus on the rest.

Even though I said you don't need to meet every part of the job description, you do need to understand it. Take the job description and annotate each bullet point, with either how you are qualified, or if you're not qualified, what similar experience you have that you believe is transferable. That way you can argue you can do the job even if you don't meet every requirement.

Prepare! If you dig into a company like a damn investigative journalist beforehand, it's a lot easier to impress them. You shouldn't come to an interview pitching what you see as your top skills, you should get an idea what skills that the company needs, and focus your pitch around how you have those skills.

When you doing that digging, make a note of any questions. It will impress interviewers if you're asking them just as much as they're asking you - It shows your experienced, and in a position to choose who you want to work for. Don't shy away from hard or critical questions, just phrase them politely. Also, sometimes, after you ask some questions, you'll realize you don't want the job anymore.

If you're interviewing with execs or management types who are less technical, they love a story. Look on the company's website and find their mission statement. It's usually some corporate speak BS, that describes their values. Prepare a couple stories from your life that demonstrate these values.

JOB OFFER

Okay so you aced the interview, and they've given you an offer. You might think you're done - but no - that's just the first step.

Always try to speak to ex employees about salary, or even current employees, if you know anyone personally that you trust to be discreet. Also look up the salary on Glassdoor. If it looks like they're trying to underpay you, which is something I've run into plenty, negotiate based on those known comps, and don't accept an offer until it's equitable. (If you want salary negotiation tips that's probably a whole separate longpost lol)

Salary isn't the only thing that you can negotiate on, remote work, PTO, and benefits, are also on the table.

Any legitimate job will give you an employment contract as a part of your offer package. Never ever accept a job without going over it with a fine tooth comb, and if there's anything you don't understand, hire an attorney to do that for you. (Don't tell the job you're speaking with an attorney) Whatever you spend on the attorney will pay off 100-fold, I promise.

Make sure your employment contract includes any verbal agreements that you made, including benefits, start date, salary, job title, etc. If you don't, it's just words, and the company will probably conveniently forget what they promised you.

Know that you can negotiate anything in the contract, not just salary. Anytime that you don't like or think is unfair, you can mark it up and tell the company "I'm super excited to start but a few terms give me pause would you consider striking out (these)?"

Never ever sign an arbitration agreement! It takes away your ability to take your employer to court. Jobs that try to make you sign them are exactly the jobs that ought to be taken to court, and you'll end up in a sketchy job with less recourse or legal protection - as you have signed that away.

Never sign a non-complete clause, unless you have the savings to be out of work for that length of time, plus several more months. I've seen multiple engineers be forced into extended unemployment due to litigious companies preventing them from getting a new job after they were fired or quit.

Never take a job that makes you put money down to get the job, do the job, travel for the job, etc. That's not a job - that's a scam. Legitimate engineering companies will pay for the tools and training that you need. It's a really bad sign about a company's finances or ethics, if they rely on their employees to front them money.

If you're asked to sign a NDA, figure out why. Some are legit, like they don't want you sharing expensive research around. But if they don't have a good justification? Red flag.

Make sure the contract is clear on where professional liability falls. Is it on the company or the engineer? Get this in writing and understand the liability that you are taking on.

When signing the employment contract, talk to the company's HR representative with any questions you have. If they don't have HR, or they're HR doesn't understand labor law, that's the biggest and the reddest of red flags. Run.

LEAVING A JOB

Never tell your job you're leaving, until you've gotten a signed offer letter, signed by both yourself and the new employer. Stuff falls through sometimes.

Your old job might ask you if you consider a retention offer. Always say yes, to see the offer, but never accept the offer. You can use this offer to negotiate additional perks at your new job, But I would caution against accepting it since companies will often keep you for a few months to close out your work and then lay you off afterwards, since they do not want to continue paying the new higher salary.

Try to leave on good terms, even if you're fed up. It's a small world, especially if you're in a niche field, and not starting drama will pay off in the long run. I've been glad I didn't start shit even when I was mad, because my last two jobs keep begging to hire me back, and that's good to have for emergencies. The exception is if you're leaving because you were harassed, assaulted, or asked to do something unsafe or unethical. Then, fuck em and stay the fuck away from em.

Try and take a vacation between jobs, in the US at least, time off policies fuckin suck.

YOUR CURRENT JOB

When you start a job, try and grab drinks outside of the office and away from the bosses with the other women, queer people, people of color, etc. And get their mental list of harassers, bigots, etc. Out of the jobs I've had, my current one is sadly the only one where nobody had a long list to give me.

When you get older, try to mentor people when you can. It really pays off, and I think it's the biggest way we can change a pretty shitty industry. It's not like women don't get into engineering, it's mostly that we leave because once we get here it fuckin sucks. Being able to change that even in small ways is really fulfilling.

It's a little secret that I've heard executives laugh about, that how hard you work has fuckall to do with what you get paid. You got paid more if you provide more value to the company. Learn what the non-promotable tasks that often get pushed onto women are, And don't fucking do them.

Learn about labor rights, and the history of them. The culture around work in the US is honestly pretty exploitative, Even to people with a "good job" like engineering - and to be able to recognize early on when you and your peers are being treated inequitably will save you a lot of trouble.

Your job will do a yearly performance review. When they ask you to set goals, set ones you know you can achieve. And when you're going into one, prep all the things you have to brag about. It might feel like an exercise in box checking, but its what determines your salary. So check them boxes good.

If your job offers you a promotion, sometimes it's a real promotion, and sometimes they want you to do double the work for the same pay. Don't ever take a management role or promotion without fully understanding the additional responsibility, time commitment, and pay involved. If they try to push you to take on management responsibilities without having negotiated a new salary, withhold your labor. They will not pay you more if you show them that you will do the same work for free.

Talk about salary, and work collectively with your peers whenever you can. I've had several coworkers go to the bosses to argue for raises not just for themselves but also for the women on the team who were being paid less then the guys. This stuff doesn't happen if you don't talk about salary.

Working collectively with your peers is also important if there are safety concerns at your job. You might get brushed off if you bring a safety issue to management alone, especially as a younger employee. But when the whole team comes together and refuses to work on something until the safety issues are addressed? They get fixed fast.

Treat each job like a free education, try learn the skills you'd like to gain on company time. If you find yourself doing repetitive stuff at work without learning anything new, talk to your manager about it. I've been doing this for a few years, and that's how I landed a job where all peers have masters and doctorates, and I'm keeping up with just a bachelor's. Learning on the job is a lot cheaper than college tuition, and once you have a bachelor's, can usually get you the same jobs.

Take notes on shit. It's great for retaining knowledge, covering your ass, or bringing up at performance reviews or interviews. If a job ask you to turn in your notes when you quit, keep a personal copy. Unless you signed an NDA lol.

Figure out who the smartest people at your company are, and if they all start quitting you ought to quit like a rat off a sinking ship too.

Just like your job does a performance review of you each year, do a performance review of them. Maybe don't show them that, but do set goals for the work life balance, education, etc you want out of them. If they're not meeting them, it might be a sign to move on.

WORK BOUNDARIES / SAFETY TIPS

Don't use your personal phone for work, ever. Your company will try to dodge liability if anyone harasses you. But having a company provided line? You can much more easily force them to be responsible for anything inappropriate sent to it. Plus it's a little funny seeing the look on someone's face when they realize they sent their dick pic to the company phone.

If you're a woman, or a person of color, you'll notice real quick that the company loves to put you on the front of every piece of PR material to prove that they employ someone other than white dudes. It's super uncomfortable. Becoming "passionate about cyber security and privacy" is a good excuse to refuse having your photo taken.

You'll also probably get asked to do way more public facing / PR events than the guys. Ask your employer (in writing) why you're being assigned this work. If they say anything about wanting your "unique experience as a woman" or w/e remind them that assigning extra gender-based work is a violation of employment law, and request that the public facing work gets shared equally between the whole engineering team.

If you get harassed at work, or by coworkers outside of work, document it as thoroughly as possible. Start quietly recording on your phone immediately, or if you can't do that, write up a detailed account and email it to yourself so it's timestamped. It's hard for a company to claim "he said she said" if you send them a video. Also back that stuff up off of your work accounts and computers, in case "it goes missing".

If you have to you go to HR about harassment or discrimination, study employment law, or consult with an attorney first. HR works for the company, not you, but if you bring something to them that demonstrates company liability, and legal knowledge, you can get them to work for you. The EEOC and ACLU are great resources.

Also if you have to go to HR, they like to have off the record spoken conversations to dodge liability. Take notes in the meeting. After the meeting, immediately write an email summarizing the meeting, attach your notes, and send it to HR.

If your employer asks you to commit fraud, like falsifying timesheets, financial paperwork, signing off on things that you don't have the knowledge or authority to, signing off on things that you did not read, etc. Don't. You are more likely to be held personally legally liable than your employer if that fraud is discovered. Businesses that commit fraud have their low level employees do it deliberately, to direct liability away from the corporation as a whole.

Don't stay at a company that expects you to put yourself or others in danger. OSHA is a great resource for workplace safety issues.

If If you're an engineer in the US, and your employer is pushing you to create something that you don't find safe, unfortunately there isn't always someone to report it to. Outside of specific industries with specific regulatory bodies, (like aviation) the legal system is our main recourse. So your best bet is to document it so thoroughly and leave such a paper trail (including making sure that the hazard is put in the HTS) so that your employer would be screwed in court if they hurt or kill someone. That will incentivize them to fix it. Then leave because you don't want to be there.

Remember your job is just your job. Don't tie your own self worth into the success or failure of any one company - there will always be another.


Tags :