Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Controlling USB on Raspberry Pi

by Bod (Curate)
on Dec 05, 2020 at 19:11 UTC ( #11124723=note: print w/replies, xml ) Need Help??


in reply to Controlling USB on Raspberry Pi

I deliberately included USB in the title but all the responses have dealt with using GPIO on the RPi Zero. I've actually ordered an RPi without the soldered header and my soldering skills are somewhat rusty so I was rather hoping to to be able to connect the OTG USB of the RPi to one of these modules which I have also ordered.

Is this a non-starter and, if so, why?

Replies are listed 'Best First'.
Re^2: Controlling USB on Raspberry Pi
by stevieb (Canon) on Dec 05, 2020 at 19:20 UTC

    Do you have the datasheet for the USB module? USB is simply a serial interface, for which you can use my RPi::Serial module.

    You need the communication specification so you know how to set up the serial interface, as well as what you need to send to the unit to trigger high/low states of each relay on the board.

    I've never even heard of a USB relay breakout board before, let alone used one, but I do have vast experience communicating over USB/serial to dozens of other device types, which is why I stuck with the GPIO scenario.

      Do you have the datasheet for the USB module?

      Not at present but I have a module on order and I'm hoping it will come with some clues as to what needs to happen to make it operate.

        Here's a hard learned tip... when purchasing electronic devices for these types of projects, *always* ensure that you have a datasheet up front that you can review to ensure that it seems reasonably sane, and that you can understand at least the core information it contains.

        I have written software across several languages for over a hundred random ICs and devices, and the only thing worse than no documentation, is poorly written documentation that is incorrect (nothing like the fun of debugging an IC to learn after three days of head-desking that the damned documentation failed to mention overlapping registers!).

        Hopefully this device comes with proper docs, but in the future, solidify that fact up front if you carry on doing projects like this.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11124723]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2022-05-27 00:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (94 votes). Check out past polls.

    Notices?