Loading...
 

Firmware/Software

Firmware or software that can be used to support the operation of nanodevices or system with nanodevices. My include assembly language, C, or similar languages, and operating systems.

Raspberry Pi Camera IP Webcam

morreale Tuesday 18 of August, 2020
I purchased a Raspberry Pi infrared camera module (Digikey part number: 1597-1423-ND) to turn my Raspberry Pi model B+ into a webcam. I wanted something that could see in the dark at the time I purchase the camera module late last year. When I realized that a webcam would be useful with Skype, Webex, Google Meet, Discord, and Zoom meetings, webcams and cameras in general went mostly out of stock due the stay at home orders to combat COVID-19.

The Raspberry Pi camera module uses the 5 megapixel OV5647 sensor. The camera module includes two IR LEDs. According to the Raspberry Pi website this is a version 1 camera.

Rpi Camera V1

The OV5647 sensor data sheet indicates that the camera provides the following formats. I've only managed to get the 640 x 480 resolution to works so far. The CPU utilization is 90% at this resolution and may indicate that a Model B+ may not be able to stream higher resolutions.

Mode Resolution Aspect Ratio Frame Rate FoV Binning
1 1920x1080 16:9 1 - 30 Partial None
2 2592x1944 4:3 1 - 15 Full None
3 2592x1944 4:3 1/6 - 1 Full None
4 1296x972 4:3 1 - 42 Full 2x2
5 1296x730 16:9 1 - 49 Full 2x2
6 640x480 4:3 42 - 60 Full 4x4
7 640x480 4:3 60 - 90 Full 4x4


Raspberry Pi Camera Module webpage provides useful information on using the Raspberry Pi Camera.

Raspberry Pi Webcam Setup


The article How to setup a Raspberry Pi Security Camera Livestream has some missing info so I could not follow it. I used Build a Raspberry Pi Webcam Server in Minutes instead and the steps below are a summary of the article. To begin, update the Raspberry Pi, and install motion and libjpeg62.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install motion
sudo apt-get install libjpeg62


Modify /etc/motion/motion.conf with the following changes. Motion.conf has a lot of parameters so make a back up copy before making any changes just in case.

daemon on
stream_localhost off

# Turn these off if motion freezes
picture_output off
movie_output off

# The default setting changed to 1296x730 for a 16x9 aspect ratio
# and a higher image resolution.
stream_maxrate 100  # default 100
framerate 49        # default 100
width 640           # default 640
height 480          # default 480


Motion is very sensitive to width and height settings. If they are not correct then there is no output. High resolutions setting produce a long lag in changes of motion.

Modify /etc/default/motion

start_motion_daemon=yes


Add the video driver sudo modprobe bcm2835-v4l2

Edit /etc/modulesand add bcm2835-v4l2 to the end of the file.

The following command can be used find out the status of the camera. v4l2-ctl -V

Test motion with the following command sudo motion -n -c /etc/motion/motion.conf

Use the following commands to start and stop the motion service.

sudo service motion start
sudo service motion stop


Test the Raspberry Pi Camera


Use ifconfig -a to determine the IP address of the Raspberry Pi. It should be a static IP address. If the Raspberry Pi IP address is set using DHCP, then set an IP reservation in your router to keep the IP address from changing.

Test the Raspberry Pi camera with your browser using its IP address and the port 8081. The URL would look like https://192.168.XXX.YYY:8081, for example.

Connect the Raspberry Pi Camera to OBS


To add the Raspberry Pi camera as a source in Open Broadcaster Software (OBS), selected Media Sources in the Sources block, and uncheck the Local File box. Add the IP address for the Raspberry Pi camera to the Input field https://192.168.XXX.YYY:8081). Check Use hardware decoding when available, and Show nothing when playback ends. Click okay and size the image as desired.

The Lamp-pod


I used my desk lamp as a makeshift tripod so that I could demonstrate hardware while on a video chat. The lamp-pod works, but it has a lot of limitations. I had to remove the LED light bulb to make the assembly light enough for the springs to hold up the lamp. Lifting the lamp changes the height and the angle of the camera at the same time. My camera module mount is fixed so I need to move objects on the desk to get them back in frame. To make the camera easier to position, the camera mount needs to be changed to be moveable to compensate for the angle introduced by raising and rotating the lamp arm. Also, there video lags by many seconds making it hard to position object precisely. The IR camera works well in low or with no visible light, but isn't good for my applications. It would be better for security applications.

Rpi Ip Cam 01

Rpi Ip Cam 02

OBS Installation and Setup Guide

morreale Tuesday 18 of August, 2020
Like many others, I spend a lot of time on video calls, presentations, workshops, and conferences since March due to COVID-19. My laptop camera doesn't provide much control of what is shown and it's to easy to disrupt a meeting with an open laptop mic.

I found the Open Broadcaster Software (OBS) to be very good and provides control over what is seen and heard with apps like Skype, Webex, Google Meet, and Zoom. It turned my laptop into a mini broadcasting studio using a Raspberry Pi camera running motion, and a old Android phone running IP Webcam.

Any IP device streaming video can be used with OBS along with the internal camera and USB cameras connected to the computer. I can setup scenes and switch between any scene containing feeds from a camera, combinations of camera feeds, images, screens, and applications.

To use OBS in this way, you need to install OBS (available for Windows, macOS, and Linux), and the OBS VirtualCamera software. OBS manages all the scenes and hardware, and OBS VirtualCamera make OBS look like a webcam to Skype, Webex, Google Meet, and Zoom (and other). My brief installation and setup notes are shown below.

Installation



Setup


  • Create a New Profile
  • Create a New SceneCollection
  • Add a scene and add audio, video and image sources as needed
  • Tools -> VirtualCam and start the VirtualCam server

Sources


  • Use the Audio Input for the laptop mic and the headphone mic
  • Use the Video Capture devices for the laptop webcam
  • Use the Media Source for IP webcams

Tutorials



Markdown Editor Quest

morreale Thursday 31 of October, 2019

Project Requirements

I’m working on an embedded systems workshop, and an open source software defined network course. I want to take notes on various parts of the workshop development and during the online course lectures. My collaborator on the embedded system workshop has setup a NextCloud portal so that we can develop and share information, share C code, workshop content, provide version control, chat, and create figures.

We selected Markdown as our preferred documentation processor as there is a powerful markdown plugin from NextCloud. The requirement is to use tools that provide cross-platform support (Windows, Linux, and macOS), generate documents that can be easily be shared without using email, and place all documents into version control using Subversion. My collaborator uses macOS and Linux, and I use Windows 8.1 and 10, and Kubuntu 18.04. The Markdown editor also needs to support text formatting, inline Latex math equation typesetting, Mermaid block diagrams, code blocks, and embedded videos.

This led to a mini quest to find a Markdown editor that match the capability of the Markdown editor plugin in NextCloud and run on all three operating systems. It took a while to find something that worked well.

Markdown Editors

Notepad++

I like and use Notepad++ regularly in place of the Windows notepad. Notepad++ has a Markdown viewer call MarkdownViewer++. The plugin gives basic Markdown functionality. The formatting works well but the code block text and coloring isn’t as good as in other Markdown editors. To get Latex, you need to install MikTeX to provide LaTeX capabilities for Windows. I then searched for a Notepad++ plugin for Mermaid but didn’t find something I recognized as useful. I gave up on trying to get Notepad++ to meet our requirements because it’s a Windows only tool.

I searched for Markdown editors and there are many posting on the top Markdown editors. It’s not clear from all the posting which editor would be right for this project. I investigated many of them and tested some of the promising choices. Some of the more noteworthy editors are described below.

Typora

Typora is available for all three operating systems in beta for Windows and macOS but Linux isn’t available presently. It appears to have a minimum feature set and shows the final results of the Markdown output. It wasn’t clear how to see the actual Markdown code as you write. I did not see how to enable LaTeX and Mermaid functionality so I stopped investigating it and ultimately uninstalled it.

Dillinger

Dillinger is a web based Markdown editor. It does inline LaTeX equations but did not render the Mermaid section of my text document so I stopped investigating it. It don’t seem to have an offline version.

Haroopad

Haroopad is available for Window 7 and 8, macOS, and Linux. All versions are beta releases. It looks like it has a rich feature set but since it did not support Windows 10, I stopped investigating it.

Ghostwriter

Ghostwriter is available on Windows, macOS, and Linux. I should say that a fork of Ghostwriter is available on Windows. I install the Linux version from the wereturtle repository. I tried to find a way to enable LaTeX math equation typesetting and Mermaid diagrams, but did not find what I needed. Since the Windows version seemed to complex to install, I stopped investigating it.

StackEdit

StackEdit is a nice online Markdown editor. It works very well and does a great job on code, math equations, and Mermaid diagrams. It also support UML diagrams too. It’s seems to be an in-browser only editor so I stopped investigating it.

LyX

LyX is a What You See is What You Mean document processor. It works in Windows 8.1 and 10 and needs TexLive to run. It also runs in Kubuntu. I’m new to LaTeX and TeX document processors and think LyX pretty neat. I worked with it for a while and did not find plugins to import and export Markdown files other than using Pandoc or using MultiMarkdown to generate LyX output files. The workflow with file conversion and subversion control was too complicated so I stopped investigating using it.

Caret

Caret is available for Windows, macOS, and Linux. It costs $29 so I stopped investigating.

Atom

Atom is available for Windows, macOS, and Linux. I had used it a while ago as part of the Particle Photon development toolchain. It worked okay but did not impress me very much so I ignored it, but kept encountering references to it so gave the old version a try. It didn’t work so I installed the latest version. What a difference. The new version is fantastic. It has packages for everything we are looking for.

The markdown-preview-enhanced package provides the Markdown editor functions, and supports equation typesetting, Mermaid and other diagraming tools. language-pfm provides Markdown language highlighting. language-mermaid provides Mermaid language highlighting. pandoc-convert provides a connections to the Pandoc converter tools. Pandoc needs to be installed. zotero-citations provides a connection to the graphical citation tool Zotero with betterBibTex installed. Diagrams charts, sequence diagrams, Mermaid, Python Matplotlib, and Ploty are supported by the Markdown Preview Enhanced rendering package.

Atom is made by or in association with GitHub. It does a very good job of producing Markdown content. It support more tools than Mermaid for diagrams. I’ve installed it on Windows 8.1 & 10 and on Kubuntu 18.04 LTS on a laptop and on a VM running on Windows 8.1. There is a macOS version too. It seems to work well. The only thing I’m having trouble with is getting the Markdown code for embedded YouTube views to work properly at the moment. The videos open a browser tab and pay in the browser instead of the be Markdown viewer.

References

I used the website shown below in my search for a Markdown editor: (“10 Best Markdown Editors for Linux” n.d.) WebFX and Inc. (2014) (“12 Best Free Markdown Editor for Windows” 2016) Smith (n.d.) (“How to Use Markdown in Notepad++” n.d.) (“Slant - 26 Best Markdown Editors for Windows as of 2019” n.d.) (“The 6 Best Free Online Markdown Editors and Converters” n.d.) (“The 6 Best Mac Markdown Editors for Everyone” n.d.) (“The 10 Best Markdown Editors of 2018” n.d.)


Mathematica programming reference list

morreale Friday 03 of June, 2016
Stack Exchange has a good article containing a extensive list of Mathematica programming language references. The references include introductory guides, programming style guides, tutorials, FAQ, books, examples, blogs, and related sites.

Code scholarship for women

morreale Thursday 26 of May, 2016
The Flatiron school is offering scholarships to women who are interested in learning to code. The web development program is 9 months and include programming in such languages as Ruby, SQL, Rails, HTML, CSS and JavaScript. The courses are offered online and no prior experiences is required.

Amazon DSSTNE Engine

morreale Tuesday 17 of May, 2016
Amazon has made its Deep Scalable Sparse Tensor Network Engine (DSSTNE) available open source at GitHub. DSSTNE solves deep machine learning problems and is used extensively on Amazon.com as part of the product recommendation functions of the site.

Google I/O 2016

morreale Monday 16 of May, 2016
Google I/O 2016 will be held May 18-20. Many of the talks will be streamed live.


Google Nix Collection

morreale Wednesday 06 of April, 2016
Google has made their Nix photography tools collection available for free. The tools include:
  • Analog Efex Pro — camera, film, and lens effects
  • Color Efex Pro — color filters and correction
  • Silver Efex Pro — black and white photography
  • Viveza — color and tone adjustments without masks
  • HDR Efex Pro — high dynamic range effects
  • Sharpener Pro — image sharpening
  • Dfine — noise correction

Queen of Code

morreale Saturday 06 of February, 2016
Gillian Jacobs directed a wonderful short film about Grace Hopper called The Queen of Code. The film chronicles her life and involvement in computer science. Grace Hopper was a professor of mathematics and joined the war where she worked on the Harvard Mark I computer. Her team developed the first compiler. She later developed the first human readable computer programming language COBOL (COmmon Business-oriented Language). It is still in use today.

Image
Wikipedia: Grace Murray Hopper at the UNIVAC keyboard, c. 1960

NIST Advanced Combinatorial Testing System

System Administrator Friday 12 of June, 2015
NIST has developed an Advanced Combinatorial Testing System to reduce the time it takes to test software. The method can trim test planning and design costs by up to 20 percent and improve the quality of the product during development. Lockheed Martin worked with NIST on a two year study to evaluate the process. The results have been so good they are planning on expanding using the system on other programs.

Image

3D Manufacturing Format

morreale Wednesday 20 of May, 2015
The 3MF consortium has released a new open source 3D file format called 3MF for additive manufacturing. The new format gets around the limitations of the .STL format and others too. The format was developed by Shapeways, Dassault Systemes, FIT AG/netfabb GmbH, Microsoft, HP, and Autodesk. The 3MF code library lib3FM is available for download from github.

Hour of Code

morreale Wednesday 10 of December, 2014
President Obama codes with middle school students as part of his efforts the encourage young people to code as part of a Hour of Code event. The report indicates that President Obama is the first present to code.

Image

President Obama's code was part the tutorial Code with Anna and Elsa.

Image

Linux kernel map

morreale Sunday 21 of September, 2014
MakeLinux has created an interactive map of the Linux kernel. The map shows key functions of the kernel and how they interconnect. The function include:
  • Human interface
  • System
  • Processing
  • Memory
  • Storage
  • Networking

Image

AWS Summit 2014

morreale Wednesday 23 of July, 2014
The AWS Summit 2014 New York keynote is now available on archive. The AWS Summit was pretty amazing. I had no idea that Amazon had such impressive cloud systems, and that the tools are certified to be complaint with HIPAA, ITAR, and many other regulations. The slides for many of the presentation are also available.

Top programming languages

morreale Wednesday 23 of July, 2014
The IEEE Spectrum has posted and interactive list of the top programing languages in use today. The top five overall programming languages include:
  • Java
  • C
  • C++
  • Python
  • C#
I was happy to learn that Arduino is number 19 on the list and is used for embedded programming. Fortran makes the list at number 24, VHDL comes in at 28, and Forth ranks 47th.

Robots tech from Google

morreale Saturday 28 of June, 2014
This talk from Google I/O 2014 is really cool. Learn about Curiosity and robot mobility, and robot technology to help a mostly parallelized 7 year old girl communicate.

Tango, Ara, and Duet

morreale Saturday 28 of June, 2014
You can catch some of the Google I/O talks on archive now. This talk describes three project Google is working on.
  • Tango is a tablet that sees in 3D,
  • Ara is a modular phone
  • Duet is a hand drawn animation tool for producing animations on your phone. Disney animators were engaged in this effort.
It some really neat stuff.

Google IO Extend June 25-26, 2014

morreale Monday 23 of June, 2014
The Google I/O conference is to be streamed & extended to hosted location around the world June 25-26, 2014. Topics cover web development, Android development, big data, and wearable computing to name a few.

Made with Code

morreale Friday 20 of June, 2014
Google has a new website, Made with Code, to inspire girls to code. Chelsea Clinton, Girls Inc., Girl Scouts of the USA, Mindy Kaling, MIT Media Lab, National Center for Women & Information Technology (NCWIT), Seventeen and TechCrunch are all supporters of this effort. It looks to be free. I tried the bracelet lesson and Shapeways (3D Printing company) will make your bracelet for you for free so that's cool.

  • «
  • 1 (current)
  • 2