Go to advanced search

by cmrincon
Mon Jun 08, 2020 8:30 am
Forum: Python
Topic: Help my code to look better
Replies: 12
Views: 546

Re: Help my code to look better

Here is how my code looks after your tips: def read_config_file(config_file_path): """Reads and parse a config file. Args: config_file_path: path to the file to parse. Returns: A dictionary with the mapped settings. """ spells_dictionary = {} line_number = 0 with open(config_file_path, 'r') as confi...
by cmrincon
Sun Jun 07, 2020 8:32 pm
Forum: Python
Topic: Help my code to look better
Replies: 12
Views: 546

Re: Help my code to look better

Thanks you! I don't know if it's required by some Python documentation standard but I would move the comment block at the top to outside the function so as to not break up the code. https://google.github.io/styleguide/pyguide.html Chapter 3.8.3 . Docstring requires it. It's a trick question. It's ve...
by cmrincon
Sun Jun 07, 2020 6:02 pm
Forum: Python
Topic: Help my code to look better
Replies: 12
Views: 546

Help my code to look better

Hi! today i read the google style guide ( https://google.github.io/styleguide/pyguide.html ) and i started to make some of my code to look nice. But this function it still looks awful. Roast my code, all tips all welcome def read_config_file(config_file_path): """Reads and parse a config file. Args:...
by cmrincon
Tue Dec 24, 2019 7:01 pm
Forum: C/C++
Topic: Reading a GPIO Switch in C language
Replies: 6
Views: 837

Re: Reading a GPIO Switch in C language

Use wiring pi library

You can look for examples here: http://wiringpi.com/examples/
by cmrincon
Mon Nov 04, 2019 8:57 am
Forum: Beginners
Topic: Generate 100Khz amplitude modulated signal
Replies: 34
Views: 3538

Re: Generate 100Khz amplitude modulated signal

The only tricky part is the analog mixing , which has been around before computers ;) It could be as simple as two extra resistors. This is basically an AM radio transmitter. . You need a Guilbert Cell https://www.electronics-notes.com/articles/radio/rf-mixer/gilbert-cell-rf-mixer.php not just 2 re...
by cmrincon
Sun Nov 03, 2019 10:26 pm
Forum: Beginners
Topic: Generate 100Khz amplitude modulated signal
Replies: 34
Views: 3538

Re: Generate 100Khz amplitude modulated signal

I would do it like this ... 1) Generate 100kHz square wave and filter to sine wave (relatively easy to do) 2) Generate 5Hz sine wave with a DAC. (Could be just a few resistors on some GPIO pins and a buffer amplifier). 3) Use an analogue mixer (multiplier) to perform the modulation. 4) Buffer and f...
by cmrincon
Sun Oct 27, 2019 6:43 am
Forum: Español
Topic: Como recupero memoria de la sD
Replies: 12
Views: 5715

Re: Como recupero memoria de la sD

En windows te bajas:
https://www.sdcard.org/downloads/formatter/
Es muy facil de utilizar.
Ademas tienes la opcion de meterla en un movil y formatearla y ademas por supuesto, formatearla en linux(aunque no puedo explicarte como, seguro que google si que puede)
by cmrincon
Thu Oct 24, 2019 7:12 am
Forum: Español
Topic: Temperatura Voltaje Corriente
Replies: 1
Views: 1198

Re: Temperatura Voltaje Corriente

Échale un vistazo a esto:
https://learn.adafruit.com/adafruits-r ... /hardware

Phyton es ideal para tu proyecto y creo que podrás usar la librería mathplot para hacer las gráficas.
by cmrincon
Thu Oct 17, 2019 12:01 pm
Forum: Español
Topic: Iniciar Raspberry Pi 4
Replies: 6
Views: 2484

Re: Iniciar Raspberry Pi 4

Suponiendo que estas usando una fuente de alimentacion de buena calidad, cables de buena calidad, tarjeta SD de buena calidad ( como dijiste antes) y que el hash de la imagen que descargaste coincida con el publicado en la página donde se descarga raspbian, no quedan muchas opciones. Date cuenta que...
by cmrincon
Wed Oct 16, 2019 7:38 pm
Forum: Español
Topic: Medidor de temperatura y envio de datos telematicamente
Replies: 1
Views: 1210

Re: Medidor de temperatura y envio de datos telematicamente

Yo utilizaría un microcontrolador ESP32 por cada sensor, los conectaría al wifi y con la raspberry y un pequeño script recibiría los datos mediante sockets y mostraría los resultados en pantalla.
by cmrincon
Wed Oct 16, 2019 2:44 pm
Forum: Español
Topic: Iniciar Raspberry Pi 4
Replies: 6
Views: 2484

Re: Iniciar Raspberry Pi 4

¿Has tenido en cuenta que la tarjeta sd debe ser de menos de 64 gb?

https://www.raspberrypi.org/documentati ... d-cards.md

En caso de que sea de 64 gb o mas aun asi se puede instalar pero es algo mas farragoso.
by cmrincon
Wed Oct 16, 2019 12:41 pm
Forum: Español
Topic: Iniciar Raspberry Pi 4
Replies: 6
Views: 2484

Re: Iniciar Raspberry Pi 4

¿Seguiste algun tutorial o guia? Que tarjeta sd usaste? Es original?
by cmrincon
Sun Oct 13, 2019 10:59 am
Forum: C/C++
Topic: Where can I begin learning C/C++?
Replies: 84
Views: 9798

Re: Where can I begin learning C/C++?

I have the feeling what the C++ world needs now is books and tutorials to present modern C++ to beginners, leaving out tons of historical baggage that no longer recommended and is only confusing. I feel that c++17 and c++2a is so new that most people don't care about use it. I will stick with c++11...
by cmrincon
Fri Oct 04, 2019 12:22 pm
Forum: C/C++
Topic: Where can I begin learning C/C++?
Replies: 84
Views: 9798

Re: Where can I begin learning C/C++?

And what about learning modern c++ style? Do you have any resource to learn the new features of the lenguage?
by cmrincon
Mon Sep 23, 2019 8:01 pm
Forum: Beginners
Topic: Control my shutters with a radio emitter?
Replies: 11
Views: 662

Re: Control my shutters with a radio emitter?

Hi! I agree with gordon, we need more information to help you. We need to know the modulation type used in your shutters in order to help you. Notice that it's posible you wasted your money in a wrong transceiver. I did something similar but with my garage door. For that purpose a SDR was very usefu...
by cmrincon
Fri Sep 06, 2019 11:32 am
Forum: Python
Topic: MP3 player
Replies: 41
Views: 3273

Re: MP3 player

i found a python m3u parse. It can be useful:

Take a look at:
https://github.com/Timmy93/M3uParser
by cmrincon
Fri Sep 06, 2019 7:45 am
Forum: Python
Topic: MP3 player
Replies: 41
Views: 3273

Re: MP3 player

Hi! it would be nice: reading a m3u list and play its songs, also adding a feature to create m3u lists in order to save your own lists can be a nice feature. I saw that you devised your own format list. I don't understand why you did this, and why you didn't use m3u or any other. I understand that t...
by cmrincon
Fri Sep 06, 2019 7:45 am
Forum: Python
Topic: MP3 player
Replies: 41
Views: 3273

Re: MP3 player

(repeated post)
by cmrincon
Fri Sep 06, 2019 7:22 am
Forum: Python
Topic: MP3 player
Replies: 41
Views: 3273

Re: MP3 player

Have you thought about add m3u song lists?

It would be a very nice feature.
by cmrincon
Thu Aug 29, 2019 5:54 pm
Forum: C/C++
Topic: Ways to compile C/C++ code for pi
Replies: 10
Views: 8381

Re: Ways to compile C/C++ code for pi

Download Visual Studio Comunity 2019: https://visualstudio.microsoft.com/es/downloads/ Instalation: https://docs.microsoft.com/en-us/cpp/linux/download-install-and-setup-the-linux-development-workload?view=vs-2019 Create the project: https://devblogs.microsoft.com/cppblog/linux-development-with-c-in...
by cmrincon
Thu Aug 29, 2019 7:18 am
Forum: Beginners
Topic: Theremin project problem
Replies: 23
Views: 1483

Re: Theremin project problem

Did you wire everything right? Probably the error you get is because you made a mistake wiring the conections, the sensor isn't properly power or resistor values are wrong
by cmrincon
Thu Aug 29, 2019 5:34 am
Forum: Beginners
Topic: Need help please - Python push button code
Replies: 21
Views: 1649

Re: Need help please

Look at the error mensage What python is trying to say you is that "OUTPUT" doesn't exist in the GPIO module, instead, "output" does. So GPIO.output(12, True) will work Notice that python is case sensitive Also notice that GPIO.OUTPUT(22, TRUE) is not correct. #22 is not the pin conected to the led....
by cmrincon
Wed Aug 28, 2019 5:34 pm
Forum: Beginners
Topic: Complete beginner - Garage Door Dedection
Replies: 12
Views: 836

Re: Complete beginner - Garage Door Dedection

Hi! I think that the use of image detection is a waste of time and effort. I'm sure that you will get better solutions from people in this forum. You can use whatever language you already know, but i encurage you to use python because python has all the tools you need to develop T the project quickl...
by cmrincon
Wed Aug 28, 2019 5:21 pm
Forum: General discussion
Topic: Can i upgrade LPDDR4 4GB or 8GB form RPi4 (2GB)?
Replies: 32
Views: 4050

Re: Can i upgrade LPDDR4 4GB or 8GB form RPi4 (2GB)?

Did you even find a SoC compatible with the board which has 8 gb of memory?
by cmrincon
Wed Aug 28, 2019 4:34 pm
Forum: C/C++
Topic: Ways to compile C/C++ code for pi
Replies: 10
Views: 8381

Re: Ways to compile C/C++ code for pi

Cross compilation is an option.

I use Visual Studio 2017, im sure that you can google how to set up your VS in case you decide to use it.

Go to advanced search