Wednesday, December 29, 2021

Thoughts about my project (progress, maintainability, productivity)

Reposting from the techlahoma #tech-talk channel

I'm working on my project, but it seems to be taking awhile. I think about each part and built a small prototype of each part and then I piece these parts together thinking about the whole.

Does oop help organize all the moving parts so it is easier to rationalize?Maybe it is how my brain works, but I am basically forced to print my code out a lot, mark it up with pen,crayon, pencil, compare it  to new (and previous) code that works, and fit it into new code. In graduate school, I did a lot of procedural programming, and C is a procedural language. I do print out code that is written in typescript, so to extent it is my brain.I think writing tests both in Unity for C and Jest for typescript/javascript has helped me cover some bases. It hasn't always been TDD. I think some of the time I have had not but a vague idea of what I should code, and what libraries I should use, or what parts should be there. It was this should do this, or this should talk to this. ...Over time by working through it I discovered I also needed to do thisValgrind is a very useful tool for writing C code. It just saved the day today my reminded me I needed to initialize a struct. After I did this, my code worked in a much more desirable way. (edited)

I'm definitely coding by code I can find online. It is not always easy to know all of the code that I need to get small things to work. Some might call this boilerplate?zI remember starting out with HTTP requests, and then through discussions here, switching to websockets. I needed a persistent connection that did not hang up because I was constantly streaming data out. (if I recall correctly)My computer is littered with small programs that I have run or compiled. Some only have a small change from the next. At times when I have had the discipline to use Git my organization has improved. (edited)

I do get scenes like this quite a bit. There is nothing quite like printing stuff out and marking it up, whether it be code, a tutorial, or documentation.


I thought that maybe this should be a blog post.

Sunday, December 12, 2021

Friday, November 26, 2021

Monday, November 15, 2021

Heated Board Notes

 I like this. It allows me to build a heater with items I already have: https://www.youtube.com/watch?v=WT9xWyLK-Ic



Maybe add this: https://www.youtube.com/watch?v=LXhTFBGgskI to get the control part.

It looks like the heater is good to at least 100 Celsius, or maybe 120 Celsius to push it.
https://www.nanotech-elektronik.pl/index.php/en/info/materials


I did some soldering, and now I have:







I still need to add some lead wires and clean up unwanted solder from the strip traces.

I added some wire:






But I might still have some solder in a gap:




Tuesday, November 9, 2021

SSH or Tokens with GitHub -- because no passwords starting on Aug 13th

For Tokens:
https://techglimpse.com/git-push-github-token-based-passwordless/

For SSH:

Oh, since I viisted Harry's House of Pain while doing this I will share this: https://gist.github.com/xirixiz/b6b0c6f4917ce17a90e00f9b60566278 [SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)] and honourable mention: https://linuxkamarada.com/en/2019/07/14/using-git-with-ssh-keys/ . I had a problem when I ran git config --global commit.gpgsign true and had to set it to false git config --global commit.gpgsign false)

Go to: https://github.com/settings/keys

GitHub's Tutorial: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/about-ssh

Maybe this is useful someday: https://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server

Thursday, October 28, 2021

Bi-directional Communication between Heltec LoRa ESP32 and Heltec CubeCell

Direction: ESP32 to CubeCell:


Heltec LoRa ESP32 transmitting to CubeCell:
https://gist.github.com/bshambaugh/a8040e9a0964f5d60145e7211ee0455c

CubeCell receiving from Heltec ESP32:
https://gist.github.com/bshambaugh/f9bf79b9fd2d9e2ef6c8efcbb8ecb90d


Direction: CubeCell to ESP32

Heltec LoRa ESP32 receiving from CubCell:
https://gist.github.com/bshambaugh/57597999c76efb953c60eefa18cedaa0

CubeCell transmitting to Heltec ESP32:
https://gist.github.com/bshambaugh/8b619ea061ddabe142a6ebe407848ba9


+++++++++++++++++++++++++++++++++++++++++++++++

Edit: for future attractions see preliminary work forwarding received data over websockets:

https://gist.github.com/bshambaugh/a78c6a322aaade65b780809e7a6234ed


Edit: this is the code for sending data in one direction:

CubeCell:
https://gist.github.com/bshambaugh/18acf34544f219182ca224b8d648642b

Heltec ESP32:
https://gist.github.com/bshambaugh/5e7f358f034c160ce305490b149721de

Node.js:
https://gist.github.com/bshambaugh/4481addef68862bc5891d187d4391258




This is the code to send from the websockets server to the Heltec ESP32 to the Heltec CubeCell and blink based on the result of a particular string:

https://gist.github.com/bshambaugh/4ea7de432a6aee345ebc4707ea42e11e
(see : https://gist.github.com/bshambaugh/4481addef68862bc5891d187d4391258 for websockets going the other way)

Edit:

Blink light:

websocket server sketch:
https://gist.github.com/bshambaugh/6c84e52a7281b87d5c05b8df963bdbc9


CubeCell  LoRa receive sketch:
https://gist.github.com/bshambaugh/20467d0e7a97735aa690f3a39cd954af


Heltec ESP32 gateway (websocket to LoRa):
https://gist.github.com/bshambaugh/4d93e5871a32aae38a79f1548adf91e0

Blink light: https://github.com/HelTecAutomation/CubeCell-Arduino/blob/68b01ab7bf04ab2fb4d41a01287dcf4b42defd97/cores/asr6601/base/ASR_Arduino.h for https://gist.github.com/bshambaugh/20467d0e7a97735aa690f3a39cd954af#file-sketch_nov05a_cubecell_receive-ino-L92
do not use: https://github.com/adafruit/Adafruit_NeoPixel --> https://github.com/HelTecAutomation/CubeCell-Arduino/blob/68b01ab7bf04ab2fb4d41a01287dcf4b42defd97/libraries/RGB/src/CubeCell_NeoPixel.h
https://github.com/HelTecAutomation/CubeCell-Arduino/blob/68b01ab7bf04ab2fb4d41a01287dcf4b42defd97/libraries/RGB/examples/RGB/RGB.ino to make
https://gist.github.com/bshambaugh/de846af8637f590b5a47225b526f23f2
as there is a library conflict with ASR_Arduino.h forLoRaWan_APP.h for  turnOnRGB . see lines: https://github.com/HelTecAutomation/CubeCell-Arduino/blob/68b01ab7bf04ab2fb4d41a01287dcf4b42defd97/libraries/LoRa/src/LoRaWan_APP.h#L76-L77

extern "C" void turnOnRGB(uint32_t color,uint32_t time);
extern "C" void turnOffRGB(void);


Heltec ESP32 gateway (websocket to LoRa):
https://gist.github.com/bshambaugh/4d93e5871a32aae38a79f1548adf91e0




Thursday, October 14, 2021

Birectional Communication with LoRa and WebSockets Server to Blink and LED

 Ping Pong (Bi-Directional?) Communication between Heltec ESP32 (V2) and Heltec CubeCell
https://www.youtube.com/watch?v=3XOYRV0kSuo

Using a WebSockets Server to Blink an LED
https://www.youtube.com/watch?v=Gqzvq05QUKw

Put these together

Sunday, October 3, 2021

Bookmarked Links for Schemas, RDF, JSON-LD, and Category Theory

Formal Modelling and Application of Graph Transformations in the Resource Description Framework by Benjamin Braatz
https://www.semanticscholar.org/paper/Formal-Modelling-and-Application-of-Graph-in-the-Braatz/b8c85a3e7a04020259ec9a58c7e5563033f52844

JSON Schema, Schema.org, JSON-LD, What's the Difference
https://dashjoin.medium.com/json-schema-schema-org-json-ld-whats-the-difference-e30d7315686a

7 Sketches
https://math.mit.edu/~dspivak/teaching/sp18/7Sketches.pdf

RDF JSON
https://jena.apache.org/documentation/io/rdf-json.html


Edit: Also think about the context you want to use a schema in.

(13)Calbimonte, Jean-Paul et al., Semantic Sensor Data Search in a Large-Scale Federated Sensor Network, http://ceur-ws.org/Vol-839/calbimonte.pdf

I may have this and various gists
https://raptorlicious.blogspot.com/2021/02/creating-schema-with-ceramic.html

https://gist.github.com/bshambaugh


https://developers.ceramic.network/streamtypes/tile-document/schemas/basic-profile/

https://developers.ceramic.network/build/cli/quick-start/#create-a-schema

https://github.com/w3c/wot-thing-description/issues/988

https://json-schema.org/understanding-json-schema/index.html


https://json-schema.org/learn/miscellaneous-examples.html


https://github.com/ajv-validator/ajv#security-risks-of-trusted-schemas


https://github.com/kimdhamilton/schema_to_context

https://w3c.github.io/wot-thing-description/#bib-json-schema

http://json-schema.org/learn/

https://lab.allmende.io/valueflows/vf-schemas/vf-json-schema/-/tree/master/schemas

https://w3c-ccg.github.io/vc-json-schemas/v2/index.html

https://coveooss.github.io/json-schema-for-humans/#/

https://gitlab.com/btcalabs/cowcerts/schemas


https://ipld.io/docs/schemas/

Wednesday, September 22, 2021

Birectional Communication between Heltec CubeCell and Heltec LoRA ESP32 (V2)

 Actually, this was a huge step: https://www.youtube.com/watch?v=3XOYRV0kSuo  to get something like described at the end of this call (https://www.youtube.com/watch?v=Z8Wf7Srsg5U) to work. I think the next step would be to try to get this to work. https://simplerpc.readthedocs.io/en/latest/index.html . Ultimately, it needs to use Ceramic's EIP-2844 interface with the HTTP API as well. I have not done a lot of worked with RPC before,
but ultimately it seems to be a way to expose a function as if it were local. The Heltec CubeCell needs some sort of bytes to trigger execution of a signing function, and the Node.js server speaking with a Ceramic node needs some sort of bytes (if needed) from the Heltec ESP32.



Sunday, August 8, 2021

LoRa and LCD displays

 #368 How to build performing antennas for LoRa, WiFi, 433MHz, Airplanes etc.(NanoVNA, MMANA-GAL) - Andreas S.


https://www.youtube.com/watch?v=6cVYsHCLKq8


How to build a homemade mini-PLC using simplified prototype process step by step

Thursday, August 5, 2021

I found a review for the DS0138 on the EEVBlog mailing list

 Here is the link:
https://www.eevblog.com/forum/testgear/jye-tech-dso-138-review-and-performance-testing/


I have the DSO138 Mini


However, it appears for be bad for square waves. Perhaps I should use a logic analyzer instead??

https://articles.saleae.com/logic-analyzers/logic-analyzer-vs.-oscilloscope
https://www.sparkfun.com/products/15033
https://sigrok.org/

https://www.youtube.com/watch?v=KiDDL5xtnG0 [Cheap logic analyzer + Sigrok pulseview = timesaver (LHT00SU1)]

I was looking for logic analyzers viewing the output of a 55 timer. This is not it, but it seems interesting: http://exploringbeaglebone.com/chapter4/

Logic analyzers will sample a sine wave to get a square wave output:
https://articles.saleae.com/logic-analyzers/how-to-use-a-logic-analyzer


This may mean that I can get at least a qualitative representation of a high frequency sine wave.


Saturday, July 3, 2021

react, the graph, and superfluid notes

https://www.youtube.com/watch?v=Q5Xen_Y7lUk

Converting A Plain JavaScript App To React

https://github.com/portexe/VanillaCalendar

https://github.com/portexe/ReactCalendar

https://reactjs.org/docs/integrating-with-other-libraries.html


Superfluid: DeFi Surf Lesson - Money Streaming

https://www.youtube.com/watch?v=IV59r4JcOIg

https://github.com/superfluid-finance/protocol-monorepo


https://stackoverflow.com/questions/43627622/what-is-the-global-object-in-nodejs



https://blog.infura.io/ethereum-javascript-libraries-web3-js-vs-ethers-js-part-i/


React JS - React Tutorial for Beginners
https://www.youtube.com/watch?v=Ke90Tje7VS0


Getting Started With React And GraphQL

https://www.youtube.com/watch?v=5evJqX5i1zE
https://twitter.com/Brent_Shambaugh/status/1410788137828294658?s=20
https://twitter.com/Brent_Shambaugh/status/1410788137828294658?s=20
https://twitter.com/Brent_Shambaugh/status/1410788137828294658?s=20https://twitter.com/Brent_Shambaugh/status/1410788137828294658?s=20

https://twitter.com/Brent_Shambaugh/status/1410788137828294658?s=20https://twitter.com/Brent_Shambaugh/status/1410788137828294658?s=20













Wednesday, June 30, 2021

ardunio rpc websockets ...

 https://randomnerdtutorials.com/esp32-web-server-websocket-sliders/
ESP32 Web Server (WebSocket) with Multiple Sliders: Control LEDs Brightness (PWM)

https://os.mbed.com/cookbook/RPC-over-Websockets

https://github.com/elpheria/rpc-websockets

https://www.youtube.com/watch?v=LtTWSq93MTo
RPC LED Control with Sliders over Websockets

A Beginner's Guide to the ESP8266
https://tttapa.github.io/ESP8266/Chap14%20-%20WebSocket.html
https://diyprojects.io/websocket-communication-esp8266-arduino-python-test-ws4py-library-raspberry-pi/#.YNy3VjpOlFQ


https://blog.thingsboard.io/2017/01/esp8266-gpio-control-over-mqtt-using.html?m=0

Remote Procedure Calls (RPC)
https://www.youtube.com/watch?v=QmhTjsOOrlw

(edit aug 22: add this link: https://www.youtube.com/watch?v=S2osKiqQG9s )


Sending JSON over WebSockets - JavaScript Tutorial
https://www.youtube.com/watch?v=JxdPunrO084

Issues in RPC & How They're Resolved
https://www.youtube.com/watch?v=jH3RezOHROU

 

Or Weis: Python RPC and PubSub over Websockets
https://www.youtube.com/watch?v=KP7tPeKhT3o

https://www.jsonrpc.org/specification


https://eips.ethereum.org/EIPS/eip-2844


REST vs RPC vs GraphQL API - How do I pick the right API paradigm?
https://www.youtube.com/watch?v=hkXzsB8D_mo

Nate Barbettini – API Throwdown: RPC vs REST vs GraphQL, Iterate 2018
https://www.youtube.com/watch?v=IvsANO0qZEg

Tuesday, June 29, 2021

Ethereum, The Graph, React, and all that...

I've done some preliminary research:
Query Ethereum with GraphQL with The Graph 
https://www.youtube.com/watch?v=l2rzT_Dp4T0 (shows how to use the graph with node and react)

Nader Dabit's The Graph Presentations:
https://www.youtube.com/watch?v=wrV7cMebwyE , https://www.youtube.com/watch?v=wrV7cMebwyE

ETHOnline 🛠️ The Graph: Building Subgraphs on The Graph
https://www.youtube.com/watch?v=coa0Vw47qNc
https://reactjs.org/tutorial/tutorial.html

I'm trying to build an application using the graph and react. I'm new to both, but at least I've learned something. 

Drawing from (forked repositories): 
https://github.com/bshambaugh/example-subgraph
https://github.com/bshambaugh/ethdenver-dapp 
https://github.com/bshambaugh/building-a-subgraph-workshop


This is also an interesting place to look:

Getting Started With React And GraphQL

https://www.youtube.com/watch?v=5evJqX5i1zE

Monday, June 28, 2021

Analog to Digital Converter useful for the Rasperry Pi

 #104 ADS1115 Analog-to-Digital Converter for Arduino, Pi 🥧& All (2018)
https://www.youtube.com/watch?v=8qGr6Q5Ymps

TUTORIAL: How to / About the ADS1115 External 16 Bit ADC - Part 2
https://www.youtube.com/watch?v=XxUMc1jnI9U

TUTORIAL: How to / About the ADS1115 External 16 Bit ADC - Part 1
https://www.youtube.com/watch?v=oQ2lz2ZckRQ

Arduino, ADS1115 16-Bit ADC with I2C Bus and Adafruit Library – The Details
https://www.youtube.com/watch?v=7iL94z5XRFA


Monday, May 31, 2021

How to install npm packages from GitHub

 https://www.pluralsight.com/guides/install-npm-packages-from-gitgithub

Monday, May 10, 2021

SkyNet and Ceramic Links

 SkyNet and Ceramic Links:

https://www.youtube.com/watch?v=FKlg_yfQ1EY (Web3 Now: Skynet and Decentralized Applications for a Web2 World - Daniel Helm)
https://www.youtube.com/watch?v=-Y36JvYXwrw (SkyDB + IDX Workshop -  Gitcoin Media )
https://medium.com/ceramic/idx-and-skydb-joins-forces-for-a-future-of-web3-hackathon-83eff179a9a1
(IDX and SkyDB join forces for a future of Web3 hackathon)
https://github.com/ceramicstudio/web-playground (Ceramic Web Playground)
https://blog.sia.tech/skydb-and-idx-join-forces-for-a-future-of-web3-hackathon-587e29b6b16f
(SkyDB and IDX join forces for a Future of Web3 Hackathon)
https://www.youtube.com/playlist?list=PLvTrX8LNPbPkvMU9KKB3ePLQE0LSFRA2e (Skynet: Built to Explore Hackathon. - Gitcoin Media)
https://github.com/SkynetLabs/skynet-workshop (Welcome to the Skynet Workshop!)

Wednesday, May 5, 2021

LED Matrix Display Links

 led matrix display links:

How to convert images to Arduino Arrays for use on LCD displays! - Tutorial
https://www.youtube.com/watch?v=Q1iVtLQOZOI

Arduino 16x16 WS2812B RGB Matrix Animation Picture Frame - Tutorial
https://www.youtube.com/watch?v=jkg7T7jlIzU

https://www.youtube.com/watch?v=_0a9JZLGu4M

https://www.youtube.com/watch?v=cqmWfE1DSyM

https://www.youtube.com/watch?v=Mgh2WblO5_c

https://www.youtube.com/watch?v=apmOSQmeKJA

https://twitter.com/Brent_Shambaugh/status/1390005020142313473?s=20


https://www.youtube.com/watch?v=YvU_ZfF7vs4 (led matrix)

Controlling a BIG LED Matrix?! How Shift Registers work! || EB#39
https://www.youtube.com/watch?v=Degt4HUzWXY

Electronic Basics #5: How to Multiplex
https://www.youtube.com/watch?v=uQMUPhyoXoE&t=0s

================================================

Make your own 10x10 LED Matrix
https://www.youtube.com/watch?v=D_QBlFIQk-o


Controlling a BIG LED Matrix?! How Shift Registers work! || EB#39
https://www.youtube.com/watch?v=Degt4HUzWXY
[use stp16c596]


RGB LED Matrix with an ESP8266 - How to get started (pre made array)
https://www.youtube.com/watch?v=YvU_ZfF7vs4


ESP32 powered WS2812B LED Matrix [Part 2] Bluetooth Tetris using FastLED and the Arduino IDE
https://www.youtube.com/watch?v=cqmWfE1DSyM

ESP32 powered WS2812B LED Matrix [Part 3] Breakout and snake added!
https://www.youtube.com/watch?v=apmOSQmeKJA

ESP32 spectrum analyser VU meter using arduinoFFT and a FastLED matrix
https://www.youtube.com/watch?v=Mgh2WblO5_c

Understanding and Controling the LED Matrix Shield
https://www.youtube.com/watch?v=jLnLXc81mwI

8x8 LED Matrix for Arduino
https://www.youtube.com/watch?v=G4lIo-MRSiY

YouTube Button - Nerd Level [ESP8266, RGB LED Matrix]
https://www.youtube.com/watch?v=wvBFtz7Ioio

Arduino Project #12 | 3 Pins, 32 LEDs, 4 Shift Registers [74HC595]
https://www.youtube.com/watch?v=N7CAboD1jU0


8×24 LED Matrix 4×74HC595 Shift Register | Electronic Projects
https://www.youtube.com/watch?v=jrjdtTNI5IA


Make Your Own LED Matrix !
https://www.youtube.com/watch?v=evA4Fp1G76E


Arduino Shift Register Scanning LEDs effect
https://www.youtube.com/watch?v=s97TUARBc2U


This looks like the 1st video I should watch for my common cathode LEDs:
Build your own RGB LED Cube Part 1: the cube and case
https://www.youtube.com/watch?v=EnM3p2TmWXc


edit: July 8th:

8×24 LED Matrix 4×74HC595 Shift Register | Electronic Projects
https://www.youtube.com/watch?v=jrjdtTNI5IA

How to at least control One color of a common cathode LED:
---------------------------------------------------------------

LED Sink Driver::
STP16C596   ===> connects LEDs cathode to ground
https://www.st.com/resource/en/datasheet/CD00005085.pdf

https://electronics.stackexchange.com/questions/379481/how-does-a-tlc5917-led-driver-work

https://arduino.stackexchange.com/questions/16858/leds-difference-between-common-anode-and-common-cathode

http://www.learningaboutelectronics.com/Articles/Common-cathode-RGB-LED-circuit.php


SN74LS14N
https://datasheet.octopart.com/SN74LS14N-Texas-Instruments-datasheet-8443459.pdf

74HC595 shift regsiter
How to Control a TON of RGB LEDs using 74HC595 and Arduino UNO
https://www.youtube.com/watch?v=hqVpxCPFaQk

16 RGB LED's and Shift Registers
https://www.youtube.com/watch?v=2raRQfG1lh0

8 X 8 RGB Led Matrix
https://www.youtube.com/watch?v=TyvUlncVdT4


Arduino driven BlokClok (using 74HC595 Shift Registers and an RGB Dot Matrix Display)
https://www.youtube.com/watch?v=EthZQ-0aDoQ

https://www.hackster.io/techmirtz/using-common-cathode-and-common-anode-rgb-led-with-arduino-7f3aa9

https://www.instructables.com/RGB-LED-Matrix-1/
---------------------------------------------------------------

For color LEDS, but uneccessary:

Make your own 15x10 RGB LED Matrix - Part 3 || Glediator support with Raspberry Pi 2/ Banana Pro
https://www.youtube.com/watch?v=4jc93BTGSmc

Make your own 15x10 RGB LED Matrix - Part 2
https://www.youtube.com/watch?v=LJQ2KS1CJjg


Make your own 15x10 RGB LED Matrix - Part 1
https://www.youtube.com/watch?v=8pFcZ-ijrDY

for common anode LEDs
https://tronixstuff.com/2013/10/21/tutorial-arduino-tlc5940-led-driver-ic/
https://twitter.com/Brent_Shambaugh/status/1390005020142313473?s=20

https://twitter.com/Brent_Shambaugh/status/1390005020142313473?s=20

Sunday, May 2, 2021

Wednesday, April 28, 2021

NanoVNA link

NanoVNA Testboard kit VNA Test Demo Board (nanovna-users@groups.io)


https://groups.io/g/nanovna-users/topic/73104745?p=,,,20,0,0,0::,,,0,0,0,73104745

Monday, April 26, 2021

Database Systems... for fun

Database Systems - Cornell University Course (SQL, NoSQL, Large-Scale Data Analysis)


https://www.youtube.com/watch?v=4cWkVbC2bNE