This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Newtonsoft.Json; | |
String json = "{\"items\": [{\"name\": \"ground pork\", \"calories\": 668.2, \"serving_size_g\": 226.796, \"fat_total_g\": 47.4, \"fat_saturated_g\": 17.7, \"protein_g\": 57.8, \"sodium_mg\": 168, \"potassium_mg\": 508, \"cholesterol_mg\": 210, \"carbohydrates_total_g\": 0.0, \"fiber_g\": 0.0, \"sugar_g\": 0.0}]}"; | |
Recipe_List rec = JsonConvert.DeserializeObject<Recipe_List>(json)!; | |
Console.WriteLine(rec.Items![0].Name); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import time | |
import os | |
import signal | |
# Some trigger condition to start stream | |
process = subprocess.Popen("/home/pi/picam-stream.sh", preexec_fn=os.setsid, shell=True) | |
# Wait for some condition to stop stream | |
time.sleep(15) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ================================================================= | |
# Stream configuration file for Raspberry Pi Camera | |
# | |
# @author Russell Feldhausen ([email protected]) | |
# @version 2019-06-05 | |
# | |
# This set of commands should allow you to stream video from your | |
# Raspberry Pi Camera to Twitch and Youtube (and possibly other |