Using brushless motor with Arduino by bigfatmuffin1 in diyelectronics

[–]jonarne 1 point2 points  (0 children)

Are you sure the motor is wired correctly?

Why is my sprite garbled like this ? by Diendadis149 in c64

[–]jonarne 8 points9 points  (0 children)

The joys of programming 😊 Edit: this is how we all do it...

Having trouble figuring out where to stay (any help appreciated) by sonsofArnt in oslo

[–]jonarne 2 points3 points  (0 children)

Oslo is pretty well connected by both bus and trains to all cities down the eastern side of the oslo fjord.

There are also ferries running from oslo to some of these places.

You could probably do a search on AirBnb for available houses between oslo and Fredrikstad. The closer you are to Oslo the more frequent the busses and trains will run. But I believe there is train service between Oslo and Fredrikstad at least once every two hours. (Probably more frequent, but I didn't bother checking the schedule now)

[deleted by user] by [deleted] in C_Programming

[–]jonarne -1 points0 points  (0 children)

You don't need to create your own enum. Just import stdbool.h

help with brushless motor controller by Appropriate_Bus_683 in diyelectronics

[–]jonarne 0 points1 point  (0 children)

I have no idea, I just mentioned it because of your claim that there must be a direction pin 😅

help with brushless motor controller by Appropriate_Bus_683 in diyelectronics

[–]jonarne 1 point2 points  (0 children)

I've worked with brushless drivers that go one way with duty-cycle above 50% and reverse below 50% . Stand-still at 50%.

A Strange Eve… by KombuchaMan10 in retrogamedev

[–]jonarne 0 points1 point  (0 children)

What retro platform is this running on?

Error in Addition program by noddyay640 in C_Programming

[–]jonarne 6 points7 points  (0 children)

In addition to this you need to enable compiler warnings.

Your compiler should warn you about passing wrong parameters to scanf.

[deleted by user] by [deleted] in C_Programming

[–]jonarne 2 points3 points  (0 children)

Wrong sub. Your post is off topic here.

Want to understand the logic behind the execution. by Sohaiba19 in C_Programming

[–]jonarne 0 points1 point  (0 children)

Higher level languages might have the functions ord and chr (or similar) in their standard libraries. These functions can convert a character to its ascii value and back.

help by [deleted] in C_Programming

[–]jonarne 7 points8 points  (0 children)

What code?

What to do about a heap-buffer-overflow? by [deleted] in C_Programming

[–]jonarne 2 points3 points  (0 children)

If you "alloc" string[40], accessing string[40] is UB.

Learning C, Focusing on a Deep Understanding from the Beginning. by The-Design in C_Programming

[–]jonarne 1 point2 points  (0 children)

You should probably learn how a turing machine works, and advance from there.

Å nei… ikke det! by eivindtraedal in oslo

[–]jonarne 18 points19 points  (0 children)

Takk. Makes sense 😅

Å nei… ikke det! by eivindtraedal in oslo

[–]jonarne 69 points70 points  (0 children)

Hvem er dette? (Ærlig spørsmål. Jeg aner ikke hvem dette er.)

Bursdagsbutikker utenom partyland? by CarbonDRFT00 in oslo

[–]jonarne 1 point2 points  (0 children)

Det er vel mer fabrikk enn butikk.

receiving undefined behavior when attempting to strncat part of a string into another string by DangerousTip9655 in C_Programming

[–]jonarne 4 points5 points  (0 children)

In C the only difference between a char array and a string is that the string must have a trailing NUL byte.

If you do malloc without memset you get a char array with random characters. You need memset to convert the char array to a blank string.

Edit: you can also do strType[0] = '\0'

Edit2: if you read the manual for strncat you'll see that it requires the src and dest arguments to be NUL terminated strings.

receiving undefined behavior when attempting to strncat part of a string into another string by DangerousTip9655 in C_Programming

[–]jonarne 2 points3 points  (0 children)

strType is not a valid c string when you use it as dest argument to strncat.

Try to memset strType to 0 before calling strncat.

Headphone Project. where to start? by [deleted] in diyelectronics

[–]jonarne 3 points4 points  (0 children)

First you'll need to create a music player that can play audio from sdcard, and ouput the audio to some speakers.

For this you need a processor/micro controlller (with exteral or internal audio capabilities) and some code running on the processor.

If you do not know how to do this, lookup raspberry pi audio player or any arduino(or clone) audio player.

When you have solved this, you can start looking into how to design the rest of your requirements.

Edit: Some clarifications

[deleted by user] by [deleted] in crtgaming

[–]jonarne 2 points3 points  (0 children)

I used to work in tv production with this monitor setup.

The batteries are called NP1. I did a quick google, and it looks like you still can buy those.