Go to advanced search

by danjperron
Tue Nov 30, 2021 12:25 am
Forum: Networking and servers
Topic: UDP works on Windows 7 but not RPI4
Replies: 15
Views: 421

Re: UDP works on Windows 7 but not RPI4

The difference I see with the socat command is the binding. try this version import socket import time import struct udpHost='' #any IP udpHostPort=8001 updArcadia = '192.168.0.19' updArcadiaPort = 4567 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.bind((udpHost,udpHostPort)) #Host, P...
by danjperron
Mon Nov 29, 2021 8:49 pm
Forum: Networking and servers
Topic: UDP works on Windows 7 but not RPI4
Replies: 15
Views: 421

Re: UDP works on Windows 7 but not RPI4

OK. Maybe go by simple step first. Check if it works with your PI alone. Set your UDP received part to be all IP instead of specific one. You also enable the broadcast option but you didn't set the IP to the correct broadcast address. (end by .255) I made a small python script to describe you the me...
by danjperron
Mon Nov 29, 2021 3:09 pm
Forum: Networking and servers
Topic: UDP works on Windows 7 but not RPI4
Replies: 15
Views: 421

Re: UDP works on Windows 7 but not RPI4

I did a copy/paste this time and it worked! Now, why does this work by python code does not? Just a question! you create a socket to receive UDP packet and you use the same socket to send something with a different IP and port. Hum.... In my mind you should have create two sockets. One to receive y...
by danjperron
Tue Nov 23, 2021 5:05 pm
Forum: Other programming languages
Topic: Potentiostat using Raspberry Pi (LUA programming language)
Replies: 11
Views: 374

Re: Potentiostat using Raspberry Pi

I assume that you install luajit.
Then your current folder needs to be were echem.lua is located.

N.B. echem.lua needs a touch screen . You will have to modify the code if you want to use a mouse instead.
by danjperron
Mon Nov 22, 2021 8:47 pm
Forum: Troubleshooting
Topic: Why are my cron jobs not running?
Replies: 5
Views: 182

Re: Why are my cron jobs not running?

Does it works manually ?

Is your SD card full?

Is the SD card corrupt?
1 - Try to force a fsck and reboot => sudo shutdown -rF now
2 - Clone the SDcard and put the new one in.
3 - The other approach is to do a clean install with a brand new SD card
by danjperron
Mon Nov 22, 2021 7:42 pm
Forum: Troubleshooting
Topic: Why are my cron jobs not running?
Replies: 5
Views: 182

Re: Why are my cron jobs not running?

Create a dummy cronjob to figure out if it is the bluetooth or cron.

Code: Select all

*/30 6-22 * * *  /bin/date >>/home/pi/logdate.txt
Check the file to see if cron added the date in logdate.txt
by danjperron
Fri Nov 19, 2021 7:06 pm
Forum: Beginners
Topic: Resister Values
Replies: 31
Views: 865

Re: Resister Values

The overall principle remains. If you're going to use a resistor as a safety precaution, at least use a value that will actually be safe. You could short GPIO without any problem! It is current limited (max ~16ma on output). The resistor prevent the beginners to connect VCC to GND and short the sys...
by danjperron
Fri Nov 19, 2021 4:27 pm
Forum: Beginners
Topic: Resister Values
Replies: 31
Views: 865

Re: Resister Values

@W. H. Heydt

The GPIO is an input so no need for a resistor! the current draw at the resistor will be the current from the GPIO pull down.(if any)

I think the idea was to prevent short on any beginners misconnection.
by danjperron
Mon Nov 15, 2021 5:48 pm
Forum: Troubleshooting
Topic: read RS485 data
Replies: 11
Views: 374

Re: read RS485 data

Hi David, do you have a picture of your setup? Did you disable the login serial console? Often this is the problem. Is the terminator resistor , 120 Ohm , are build inside the converter? What is your TTL converter? Do you need to set the DTR or RTS to switch the data direction? Are you using the +/-...
by danjperron
Tue Nov 09, 2021 12:23 am
Forum: Troubleshooting
Topic: control a DAC with SPI
Replies: 13
Views: 361

Re: control a DAC with SPI

placed 12V on pin 20 (HVC) then wrote my command. and received the correct output.
What about the whiper lock enable/disable.
chapter 4.2.6 of the pdf.
by danjperron
Sun Nov 07, 2021 2:16 pm
Forum: Troubleshooting
Topic: control a DAC with SPI
Replies: 13
Views: 361

Re: control a DAC with SPI

For the not volatile part you need to set HVC to 12V. search HVC on the pdf.
the best way will be to activate two PNP transitors to get 12V and 3.3V. You will need to find a way to protect your PI. Use a diode to prevent the 12V to go into your PI.
by danjperron
Fri Nov 05, 2021 4:57 pm
Forum: MicroPython
Topic: measure Frequency on the pi pico
Replies: 4
Views: 243

Re: measure Frequency on the pi pico

I dont really have schematics, since I do just use the radios speaker connected to pin 15. Really you need to condition your signal. I will be amaze if it works directly! Try maybe using a small transistor to convert the AC signal center at 0V to a digital signal at 0 to 3.3V Something like that, (...
by danjperron
Fri Nov 05, 2021 12:56 pm
Forum: MicroPython
Topic: measure Frequency on the pi pico
Replies: 4
Views: 243

Re: measure Frequency on the pi pico

Hi Devryd, How do you normalize the receiving and transmitting signal ? Handheld radio works with sound. The signal is around +/- 100mV for a microphone and roughly 2V peak to peak with an audio output (speaker 200mW). You can't connect the output directly to the Pico. We need your schematic and you...
by danjperron
Thu Nov 04, 2021 7:33 pm
Forum: Français
Topic: Consulter un AD grâce a un Raspberry pi
Replies: 4
Views: 321

Re: Consulter un AD grâce a un Raspberry pi

AD ??? ok un Arduino. J'ai déja des projets avec un arduino qui utilise une banque de données pour ourvrir ou fermer la porte. Regarde le code Door system sous https://github.com/danjperron/MFRC522-python Le système complet est sous modbus avec plusieurs points d'entrées avec des Arduinos. Le Pi est...
by danjperron
Tue Nov 02, 2021 8:06 pm
Forum: Troubleshooting
Topic: control a DAC with SPI
Replies: 13
Views: 361

Re: control a DAC with SPI

MCP48FEB24 needs 3 byte of data. First byte is the command , and the two others are the data. Check page 77,78 https://www.farnell.com/datasheets/3165003.pdf Memory map are on page 56. Also use xfer2. the CS line will be held low for the 3 bytes transfer. xfer2([ LSBYTE, MSBYTE, COMMAND]) xfer2([com...
by danjperron
Thu Oct 28, 2021 7:08 pm
Forum: Beginners
Topic: Small stepper motors - which and how?
Replies: 13
Views: 294

Re: Small stepper motors - which and how?

Hi PhiphyL, could you show us your layout, picture of your setup and the application source code when you were using the A4988. You will have to figure out which coil is which using a multimeter by testing the resistance. Wires from the same coil should have some resistance value. Did you have any t...
by danjperron
Sat Oct 23, 2021 8:04 pm
Forum: Automation, sensing and robotics
Topic: Voltage sensor using ADC0832
Replies: 18
Views: 1224

Re: Voltage sensor using ADC0832

It seems like an INA260 would make this monitoring task much simpler.......?
Nice I.C.but ..

What I understand about it is that the user want to measure the amount of energy from the sum . So You still need a load. If you have a know load then the ADC0832 will be enough!
by danjperron
Mon Oct 18, 2021 7:02 pm
Forum: Other projects
Topic: Advice needed for silly a project
Replies: 3
Views: 346

Re: Advice needed for silly a project

I know that HDD motor is not typical! Three phases motor is a little more complicated. Maybe start simple. A small three wheels robot maybe. https://thepihut.com/collections/raspberry-pi-kits-and-bundles/products/sts-pi If you prefer your could build your own from china distributor. This what I did ...
by danjperron
Mon Oct 18, 2021 3:24 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 - cannot connect more than two at one tile to raspberry pi? (Pretty urgent, please help)
Replies: 12
Views: 561

Re: MCP23017 - cannot connect more than two at one tile to raspberry pi? (Pretty urgent, please help)

oh!!!!

Did you power the other I.C. According to your picture only one of the MCP23017 is powered up.

You need to power all of them otherwise the unpowered I.C. will drive the I2C low and you won't be able to see any activity on the i2c bus.
by danjperron
Fri Oct 15, 2021 5:22 pm
Forum: Troubleshooting
Topic: Programming a servomotor
Replies: 1
Views: 110

Re: Programming a servomotor

Hi chaymoss, - First thing. Any servo servo will stop working if it doesn't received pulse every 20ms. This is a problem since your frequency is set to 40Hz. (25ms). Use frequence=50 Servo use 1 to 2 ms pulse for +/- 45 degree. A lot of them could use 0.5 to 2.5ms for +/- 90 degree 0 degree => 0.5ms...
by danjperron
Thu Oct 14, 2021 8:07 pm
Forum: General discussion
Topic: how to best erase data on a big usb drive?
Replies: 9
Views: 421

Re: how to best erase data on a big usb drive?

or perhaps: Code: Select all sudo dd if=/dev/zero of=/dev/sda bs=512 count=1 With the count=1 it will erase the MBR only. All data are still there for forensic extraction. You will have to recreate the partition and format. A note between bs=512 and bs=1MB, bs=512 =>Fill 512 bytes buffer and write ...
by danjperron
Thu Oct 14, 2021 5:31 pm
Forum: Français
Topic: Problème d'enregistrement d'image prise par une picaméra
Replies: 2
Views: 168

Re: Problème d'enregistrement d'image prise par une picaméra

Pour la résolution de la picaméra il faut ajuster les paramètres dans le module bcm2835-v4l2 et passer les dimensions dans python. Voici un exemple avec la picaméra HQ en regroupement 2x2. pi@pi4cam:~/projector $ python3 Python 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] on linux Type "h...
by danjperron
Thu Oct 14, 2021 4:46 pm
Forum: Français
Topic: Problème d'enregistrement d'image prise par une picaméra
Replies: 2
Views: 168

Re: Problème d'enregistrement d'image prise par une picaméra

Salut Martin,

j'assume que tu utilises python.

Voici la partie de mon démo pour décoder une grille Sudoku.
https://github.com/danjperron/sudokuSolver

regarde le script python grabimage.py.

J'utilise CV2 et tout simplement la fonction cv2.imwrite(fname,frame) pour enregistrer une image.

Go to advanced search