PubInv / general-purpose-alarm-device

A general purpose alarm device (with software) as a module for medical devices (and others)
https://www.pubinv.org/project/general-purpose-alarm-device-gpad/
GNU Affero General Public License v3.0
4 stars 11 forks source link

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

Open ForrestErickson opened 2 months ago

ForrestErickson commented 2 months ago

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 commented 2 months ago

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

The GPAD connector is an RJ11 6P6C connector

ForrestErickson commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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.