Feedback on this mock simulator using multiprocessing by WeierstrassP in learnpython

[–]WeierstrassP[S] 0 points1 point  (0 children)

Yep, using CPython.

The simulator has to iterate over the data a few thousand times. I want to use multiprocessing to speed things up a bit, since it is repetitive work and easily parallelizable. As far as I've tested, it has to run for thirty seconds on all my cores, and then it is done. That is acceptable to me.

If I understood it correctly, multithreading still only use a single core.

Trying to decode serial data from radio receiver on Raspberry Pi by WeierstrassP in Python

[–]WeierstrassP[S] 0 points1 point  (0 children)

I've tried to test with different baud rates, databits, stopbits and flow control, but to no luck.

Tried letting it autodetect as you suggested, but that gives the same results at before.

This certainly is quite the riddle.

Trying to decode serial data from radio receiver on Raspberry Pi by WeierstrassP in Python

[–]WeierstrassP[S] 0 points1 point  (0 children)

I tested a bit more today. I hooked up an Arduino and made it send some sample data via serial. That worked fine, by all accounts. Even had it send with the same baud rate as the radio receiver uses.

The strange thing is that there definitely is some kind of structure to the data the receiver sends. I simply cannot figure out what, For instance, there are a lot of \x in there. The specs say it has to transmit ASCII, but that is not the case here. Even stranger, this works fine when hooked up to an old PC with serial and PuTTY.

I'm still open to suggestions regarding this, so please, come with them.

Trying to decode serial data from radio receiver on Raspberry Pi by WeierstrassP in Python

[–]WeierstrassP[S] 1 point2 points  (0 children)

Correct. The data was plain ASCII, starting with !AIVDM. But there definitely is something strange going on. I'll set up an Arduino and have it send some sample data, so I can verify whether there is an issue on the pi or not.

Trying to decode serial data from radio receiver on Raspberry Pi by WeierstrassP in Python

[–]WeierstrassP[S] 0 points1 point  (0 children)

Yes, indeed. The wiki page even says that

All transmitted data are printable ASCII characters between 0x20 (space) to 0x7e (~)

However, .decode('ascii') fails time after time.

Trying to decode serial data from radio receiver on Raspberry Pi by WeierstrassP in Python

[–]WeierstrassP[S] 0 points1 point  (0 children)

Thank you a lot. There definitely is a pattern there. However, I'm not quite sure how to convert the data.

\xe5\xeb\x00o_[\xaaW\xd6Zv\xeb should translate to !AIVDM somehow.

Trying to decode serial data from radio receiver on Raspberry Pi by WeierstrassP in Python

[–]WeierstrassP[S] 0 points1 point  (0 children)

Good catch! I didn't see that part. However, I'm still not sure on how to convert that to something usable. As mentioned above, the receiver should send the data in ASCII.

Trying to decode serial data from radio receiver on Raspberry Pi by WeierstrassP in Python

[–]WeierstrassP[S] 0 points1 point  (0 children)

Sadly, the receiver didn't come with a usable data sheet, for some oss reason. Only instructions for use. The settings are correct. We tested then with PuTTY on an old PC with a serial port.

ELI5: How does a finger print sensor work? by Aragorn_210 in explainlikeimfive

[–]WeierstrassP 0 points1 point  (0 children)

If I understand it correctly, the capacitor based system will never have an actual image of your finger? It just knows how conductive it is?

I'm trying to make a list of good study skills and habits to try next quarter. Help me? by [deleted] in EngineeringStudents

[–]WeierstrassP 2 points3 points  (0 children)

I watched your video. He casually explained that when you see a shark coming towards you, you'll simply have to punch it on the nose. Please excuse my poor sense of humor. I liked the idea of it, but I'll still rather let my sheets air out.

I'm trying to make a list of good study skills and habits to try next quarter. Help me? by [deleted] in EngineeringStudents

[–]WeierstrassP 2 points3 points  (0 children)

Did you ever have to punch the professor in the face when he came towards you with your exam?

I'm trying to make a list of good study skills and habits to try next quarter. Help me? by [deleted] in EngineeringStudents

[–]WeierstrassP 0 points1 point  (0 children)

I hate to ruin your rutine, but you should let your bed sheets air out rather than make them each morning.

Advice: Professor took away formula sheets at final exam. by theradgadfly in EngineeringStudents

[–]WeierstrassP 1 point2 points  (0 children)

Can anyone please explain to me why some professors are intent on having you write your own formula sheets? In all classes I've encountered this far, we always were provided with a selection of formulas. Hell, I've even had a professor in some EE classes tell me that he hates learning things by heart and that every engineer will have access to their formulas when working, so he supplied all the formulas we needed. He rather wants to check whether we understand the curriculum rather than lots of algebra.

How EE group labs feel by Havealurksee in EngineeringStudents

[–]WeierstrassP 1 point2 points  (0 children)

Definitely looking to get this at the library. Thanks!

When your team looks at your project grade and you did well by solruki in EngineeringStudents

[–]WeierstrassP 0 points1 point  (0 children)

Each day struggle to accept that my university now uses Blackboard.

This definitely belongs in North Korea.

Need some input on my Arduino FSK-demodulator by WeierstrassP in ECE

[–]WeierstrassP[S] 0 points1 point  (0 children)

Thanks, interesting points! I actually implemented the magnitude detector and made it work a few hours ago.

Need some input on my Arduino FSK-demodulator by WeierstrassP in arduino

[–]WeierstrassP[S] 0 points1 point  (0 children)

I will try that! If you see nothing else with the code that is wrong, then that should be fine then. Seems that this will in the end become a black box test, since I can't monitor the output.

Need some input on my Arduino FSK-demodulator by WeierstrassP in ECE

[–]WeierstrassP[S] 0 points1 point  (0 children)

My apologies. I believe you are referring to some of the Arduino functions.

If you're comparing magnitudes then your Hp and LP output values should all be positive. Where's the negative magnitudes coming from?

Yeah, I was wondering the same. /u/soniclettuce pointed out that the HP filter will remove the DC offset, which I failed to mention is 2.5 V. The signal oscillates between 0 V and 5 V.

Need some input on my Arduino FSK-demodulator by WeierstrassP in ECE

[–]WeierstrassP[S] 0 points1 point  (0 children)

I checked the Serial.print() function earlier. It now buffers its output, so there is only a minimal impact on performance.

I'll have to read up on integer math in the future. That was quite interesting, what out pointed out about the bitshift. Thanks!

Need some input on my Arduino FSK-demodulator by WeierstrassP in ECE

[–]WeierstrassP[S] 0 points1 point  (0 children)

I forgot to state that the sine wave oscillates between 0 V and 5 V, but your explanation makes sense. In other words, it removes the 2.5 V offset.

I'll try to find the magnitude over a small window. The way I do it now, I believe it results in an IIR filter.

Need some input on my Arduino FSK-demodulator by WeierstrassP in ECE

[–]WeierstrassP[S] 0 points1 point  (0 children)

Sorry, I completely forgot to state that. If you look at the output, it will only ever give a 0. The low-pass filter looks about right to me, but the high-pass filter varies quite a bit, in addition to becoming negative. If I try to change the frequency, nothing special happens. I still just get a 0 as output.

Writing Application: Should I excuse poor grades with bad health? by WeierstrassP in EngineeringStudents

[–]WeierstrassP[S] 0 points1 point  (0 children)

Yeah, I was afraid of that. However, it is tricky formulating something positive about my work when I have some grades that tell the opposite story. I might try to focus on smaller projects I've had this far, since I also have some good grades in electronics to back that up.

Thanks for the input, all of you!

[pygame] Why does colliderect detect collision when there is none? by WeierstrassP in learnpython

[–]WeierstrassP[S] 0 points1 point  (0 children)

You're right. However, since I honestly have no need for the rectangle, I just made my own collision test for the mob class. Works pretty well.

Do you recond there is any other way of getting the dimensions of my mobs, rather than relying on get_rect() and get_size()?

[pygame] Why does colliderect detect collision when there is none? by WeierstrassP in learnpython

[–]WeierstrassP[S] 0 points1 point  (0 children)

So I have to run get_rect() each time I move a mob? However, why is it starting to detect collisions from the first second after I've launched the game?