{"id":27633709,"url":"https://github.com/djaus2/softatadevices","last_synced_at":"2025-04-23T18:19:13.310Z","repository":{"id":271223756,"uuid":"894476328","full_name":"djaus2/SoftataDevices","owner":"djaus2","description":"Updtaed base Arduino Softatta code from Soft=ata repository","archived":false,"fork":false,"pushed_at":"2025-02-27T10:02:31.000Z","size":354,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T18:19:10.029Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/djaus2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-26T12:26:10.000Z","updated_at":"2025-04-17T07:12:59.000Z","dependencies_parsed_at":"2025-01-06T11:39:40.144Z","dependency_job_id":"11564329-9290-4e00-9196-c05b1efba8e9","html_url":"https://github.com/djaus2/SoftataDevices","commit_stats":null,"previous_names":["djaus2/softatadevices"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djaus2%2FSoftataDevices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djaus2%2FSoftataDevices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djaus2%2FSoftataDevices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djaus2%2FSoftataDevices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djaus2","download_url":"https://codeload.github.com/djaus2/SoftataDevices/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250487534,"owners_count":21438612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-23T18:19:12.845Z","updated_at":"2025-04-23T18:19:13.298Z","avatar_url":"https://github.com/djaus2.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## SoftataDevices\n\n----\n\n### Updates\n- Various updatwes for Blazor2 app\n- Added 74HC165 8/16 Bit Parallel In Serial Out (To micro) _Now works for 1 byte. 2 bytes not yet implemented. (Close)_\n- Added Grove single LED and new device class DeviceInput with (Grove) Switch. _Multibit input coming_\n- Added ActuatorCapabilities property to each actuator to indicate which actuator methods apply and hence what data is required.\n  - Once instantiated, actuator can be queried for this property\n  - SoftataConsole2 app then can determine what data (byte/bit/none) is required for a method call.  \n  ```enum actuatorcapabilities {a_singlebit,a_bitonly,a_writeonly,a_both}```\n- Added QuadRelays: Bank of 4  bit manipulated relays. Could be used as any 4 bit digital output.\n  - Can also write a byte value to set/clr all 4 bits in one call.\n  - ToDo: Set number of bits/relqays\n  - Note 4 bits use 4 consecutive GPIO ports, setup only needs first (default 16).\n \n----\n\nUpdared base Arduino Softata code from the GitHub [djaus2/Soft-ata](https://github.com/djaus2/Soft-ata) repository.\n\n\u003e This is the Arduino code for interacting with devices from a Raspbery Pi Pico W. The top level code that orchestrates the remote interaction with these devices is not included here. That remains in the Softa-ata repsository in the Softata sketch there and  is subject to an update for this.  \n\u003e Soft-ata/code/***SoftaaConsole2*** app exercises this library. \n\n**Refactoring:**\n_From another perspective_ This is a refactoring of the repository [djaus2/Soft-ata](https://gitshub.com/Softata) such that ```\u003crepo\u003e/code/Softata/src``` directory is separated to here.\n[See Refactoring](#Refactoring) below.\n\n\u003e Note the Grove name as used previousy has been changed to SoftataDevices.\n\nDevices are from one of the following classes\n\n```\n                 | - Actuators\nSoftataDevice -  | - Sensors\n                 | - Displays\n                 | - Inputs (Switches etc)\n```\n\n- Each of the 3 device types on the right inherit common properties and methods from the SoftatDevice class.\n  - For example, all devices implement a default Setup().\n  - Also, all antecedant device classes include GetListofDevices() to get a current csv list of implemented devices of thaat device type.\n    - For the top level class SoftataDevice , GetListofDevices() returns a csv list of the device types.\n- Each of the classes on the right have specific properties as well\n  - Some of the device class propeties are universal from all devices of that type\n    - If no relevant for a specific device in a device type then the method is a dummy and returns without error.\n  - Some device class properties are specific to the device\n    - In particular, the Display clases have a Misc set of methods that are specific to each display type.\n\n**The full list of the implemented devices follows:**\n\n```\nSoftataDevice\n|\n├───Actuator\n│       (Grove) Relay\n│       Servo\n│       Sipo (74HC595) 8/16 Bit Serial In (from Micro) Parallel Out\n│       QuadRelay (Generic)\n|       (Grove) LED\n│\n├───Display\n│       Bargraph (using Sipo)\n│       GBargraph (Grove) Bargraph\n│       (Grove) LCD1602\n│       (Adrafruit) NEOPIXEL \n│       (Grove) OLED096\n│\n├───Sensor\n|       BME280 (Various sources, I2C connection)\n│       (Grove) DHT11\n|       (Grove) DHTXX (Is an update of DHT11)\n│       Simulator\n|       (Grove) UltrasonicRanger\n│\n└───DeviceInput\n        (Grove) Switch (new)\n\tPico (74Hc165) (Works for 1 byte) 8/16 Bit Parallel In Serial Out (To micro)\nInput Param: 0\nOK:DeviceInput Cmds:I_getCmds,I_getDevices,I_getPins,I_setupDefault,I_setupGeneral,i__getValueRange,i_readByteValue,i_readWordValue,i_PollBit,i_Getnumbits,i_GetInstanceValueRange,i_GetInputCapab\nGet next command....Is connected.\n4-F5 0 1 0 \n0\n=================\ncmd:F5 pin:0 param:1 other:0 \nInput Param: 1\nGet next command....Is connected.\n4-F5 1 2 1 \n1\n=================\ncmd:F5 pin:1 param:2 other:1 \nInput Param: 2\nDeviceInput index:1\nDeviceInput name:PISO74HC165\nInput pinout:Pin 16 (default), 16 to 21\nGet next command.ar\n```\n\nThe files in this repository are those from the src folder from the Softata Sketch in the Softa-ata repository _( see below)_  plus some from the root of the sketch folder. The Soft-ata repsository needs to be modified so as remove the src folder from this Softata folder plus those extra files, and for the softatta sketvch there to to reference this repository.\n\n\u003e Nb: Some device type classes such as Serial have been left in the top level code at this stage.\n\n## Target Device\nThe top level code Softa-ta/Softata targets a RPi Pico W. using the [PhilHower BSP](https://github.com/earlephilhower/arduino-pico). This code should work with other Arduinodevices except the inclusion of the Watchdog timer mechanism.\nPico 2W wil be tested in the near future.\n\n## Sample Code\nThere is one example sketch thus far in the examples folder, interrogate. This will run on a RPi Pico W configured for Arduino and return information about supported devices without actually needing any to be connected.\n\n## Usage\nDownload the zip file, ``` [Code]-Clone-Download Zip```, green button top right when at root of the repository in GitHub.\nCreate a new sketch then Sketch-\u003eInclude Library-\u003eAdd zip file and browse to the downloaded zip file.\nThe required includes are as per the ```interrogate``` sketch:\n\n```cpp\n#include \u003csoftatadevice.h\u003e\n#include \u003csoftataDevice_sensor.h\u003e\n#include \u003cSoftataDevice_environsensors.h\u003e\n#include \u003cSoftataDevice_display.h\u003e\n#include \u003cSoftataDevice_actuator.h\u003e\n```\n\n---------------\n\n## Refactoring  \n\n***Restatement:*** A refactoring of the repository [djaus2/Soft-ata](https://gitshub.com/Softata) such that ```\u003crepo\u003e/code/Softata/src``` directory is separated to here.\n\nThis refactored version of that folder so that it is a separate Arduino library.\n\nPreviously this folder sat below the root of the Arduino softata sketch folder. It is confiured as a hierachy of classes so that a device class inherits methods from defined in the parent and so that all classes antecendant from the same parent have the same methods, but with device specific implementations. For example, all displays implement the ```Clear()``` method. Also, all displays implement a ```Misc()``` method that has methods specific to the display type. For example, the bargraph has a misc.floww() method that turns on every odd segenment. \n\nMethods that do not return a value (such as with a sensor read), return a tristate enum value which is normally ```_ok```. If there is an error in the method, ```_nok``` is returned. If a method is not implemneted then ```notimplemneted``` is returned which at a higher level is meant to be interpretteed is OK but can be used otherwise. ```_nan_``` is alos a return option for data reads.\none \n\n----------------\n\n## Notes:\n\nThere are added features in this Softaata API compared to that in Softa-ata. These changes are meant to keep knowledge of devices in the sketch code such that the remote code can interrogate the device to determine what it can orchestrate minimising the knowledge of Softata that the remote application needs to have.\n\n\n## Soft-ata/Softata Sketch Code\n```\nSoftata\n│   Connect2WiFi.cpp\n│   Connect2WiFi.h\n│   devicesLists.h\n│   iothub.h\n│   menu.cpp\n│   menu.h\n│   NetworkSettings.h\n│   readme.md\n│   rpiboards.h\n│   rpiwatchdog.c\n│   rpiwatchdog.h\n│   serial_macros.h\n│   Softata.h\n│   Softata.ino\n│   SoftataCore2.h\n│   SoftataOTA.h\n│\n└───src : ***Moved to this repository:***\n    │   adrafruit_neopixel_display.cpp\n    │   custom_bargraph_display.cpp\n    │   grove.h\n    │   softatadevice_actuator.h\n    │   softatadevice_bargraph.cpp\n    │   softatadevice_bme280.cpp\n    │   softatadevice_dht11.cpp\n    │   softatadevice_dhtxx.cpp\n    │   softatadevice_displays.h\n    │   softatadevice_environsensors.h\n    │   softatadevice_OLED_096_display.cpp\n    │   softatadevice_relay.cpp\n    │   softatadevice_rgb_lcd_display.cpp\n    │   softatadevice_sensor.h\n    │   softatadevice_sensorsimulator.cpp\n    │   softatadevice_urange.cpp\n    │   servo.cpp\n    │   SIPO_74HC595.cpp\n    │   ic_74hc595_shiftRegister.h\n    │   ic_74hc595_shiftRegister.cpp\n    │   PISO_74HC165.cpp\n    │   ic_74hc165_shiftRegister.h\n    │   ic_74hc165_shiftRegister.cpp\n\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjaus2%2Fsoftatadevices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjaus2%2Fsoftatadevices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjaus2%2Fsoftatadevices/lists"}