Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Firmware Example For The Use Case of a Programing and New User of GPAD, #260

Open
ForrestErickson opened this issue Apr 24, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request use case For potentially external use cases

Comments

@ForrestErickson
Copy link
Collaborator

Summary

Add firmware to teach programmers how to use the GPAD.
The firmware should run on an UNO.

Requirements

Notes in all of the firmware should instruct the programmer to connect the UNO SPI bus to the GPAD.
The firmware should show how the API is called for each alarm level.

Example use case 1

User connects a 10K potentiometer from power and ground with the wiper going into A0. As the user adjusts the pot the value read for A0 will go from 0 to 1032. Send different alarm levels depending on the read value of A0

Example use case 2

User connects five switches to D3, D4, D5, D6, D7 and D8 and to ground. Each switch has a 10K pull up resistor to +5.
When a user presses and holds a switch an alarm level is determined.
Alarm level is sent to the GPAD.

@ForrestErickson ForrestErickson added enhancement New feature or request use case For potentially external use cases labels Apr 24, 2024
@ForrestErickson
Copy link
Collaborator Author

Wiring from UNO controller to the GPAD Peripheral is by a 5V logic level SIP bus.

The GPAD connector is an RJ11 6P6C connector

  • Pin 1 is nCS (Inverted input Chip Select)
  • Pin 2 is COPI (Controler out, Peripheral In)
  • Pin 3 is GND
  • Pin 4 is SCK (Serial clock and output from the Controller)
  • Pin 5 is power into GPAD. Leave this disconnected.
  • Pin 6 is CIPO (Controler In, Peripheral Out)

@ForrestErickson
Copy link
Collaborator Author

While I have not looked lately at Wokwi to see if they can have multiple processors in a project, regardless a Wokwi simulation of the Controller to a GPAD for this would be of value.
Lee

@ForrestErickson
Copy link
Collaborator Author

Lawrence wrote,

Robert,
I'm a bit unsure about what you're asking for. Are you looking for an external device, such as an arduino, to read a pot and then send the 5 alarm levels to the gpad? 
I'm assuming you're intending to do this through the SPI interface. 

Or are you suggesting to use the GPAD itself and read a pot? I'm really unsure why you want a video, who the target audience is, and if there has been any revisions of the board. 
I have one of the first revisions, but I would have to dig it out, verify it still works, and then try to both record video and do some level of circuit, that I'm not sure what the intended interface is for. 

For example, I wasn't aware that the GPAD could read a pot, or why one would use a pot to send the 5 alarm levels. 

@ForrestErickson
Copy link
Collaborator Author

Regarding, "Are you looking for an external device, such as an arduino," That was my intention as written. See above. HOWEVER a GPAD is an UNO and one GPAD can control another so the wiring is trivially easy. Just the 6P6C stright through cable.

A pot connected to an unused analog input is the most trivial way I could conceive to make a user input on which the controller could decide to send alarms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request use case For potentially external use cases
Projects
Status: No status
Development

No branches or pull requests

3 participants