Shop

I sell on Tindie

Sunday, February 13, 2022

Azure Sphere Samples - Blinking blue led

Updated post from 9/7/2019 

How to change from red, to green and blink the blue led on the Azure Sphere MT3620 starter kit. 

  • Azure Starter Kit
  • Microsoft Visual Studio
  • Watch YouTube Video (recommended for connection)
  • GitHub files
  • or Azure Blink Template
Picture
Photos credit: Bits4Bots LLC. Azure Sphere Starter Kit
So, the correlation to the RBG pins are 8, 9 , and 10. This change must be made in first the header of the .C file and the .C file itself.
This is assuming you already have your board in azsphere device prep-debug mode in the CMD window.
******************************************************If you are looking for an easy way to get going with the starter kit you're in luck! I recently started playing with the kit myself and was successful in the HelloWorld blink test. In the Azure sample code the GPIO color choice is red of the RBG.
There is also a YouTube video by Hackster that shows the code for GPIO 9, which is the green of the RBG. Today my friend you will have the information to blink the blue of the RBG, GPIO 10. 

App_manifest.json

Picture
​{
  "SchemaVersion": 1,
  "Name" : "AzureSphereBlink1",
  "ComponentId" : "dafede3f-b746-46ce-xxxx-xxxxxxxxxxx"//blocked out my personal info
  "EntryPoint": "/bin/app",
  "CmdArgs": [ ],
  "Capabilities": {
    "AllowedConnections": [ ],
    "Gpio": [ 10 ],
    "Uart": [ ],
    "WifiConfig": false
  },
  "ApplicationType":"Default"
}


Main.c

​#include <stdbool.h>
#include <errno.h>
#include <string.h>
#include <time.h>

#include <applibs/log.h>
#include <applibs/gpio.h>

int main(void)
{
    //Inspired by GitHub Azure Sphere Samples designed by Bits4Bots LLC  
//This minimal Azure Sphere app repeatedly toggles GPIO 10, which is the blue channel of RGB
    // LED 1 on the MT3620 RDB.
    // Use this app to test that device and SDK installation succeeded that you can build,
    // deploy, and debug an app with Visual Studio, and that you can deploy an app over the air,
    // per the instructions here: https://docs.microsoft.com/azure-sphere/quickstarts/qs-overview
    //
    // It is NOT recommended to use this as a starting point for developing apps; instead use
    // the extensible samples here: https://github.com/Azure/azure-sphere-samples
    Log_Debug(
        "\nVisit https://github.com/Azure/azure-sphere-samples for extensible samples to use as a "
        "starting point for full applications.\n");

    int fd = GPIO_OpenAsOutput(10, GPIO_OutputMode_PushPull, GPIO_Value_High);
    if (fd < 0) {
        Log_Debug(
            "Error opening GPIO: %s (%d). Check that app_manifest.json includes the GPIO used.\n",
            strerror(errno), errno);
        return -1;
    }

    const struct timespec sleepTime = {1, 0};
    while (true) {
        GPIO_SetValue(fd, GPIO_Value_Low);
        nanosleep(&sleepTime, NULL);
        GPIO_SetValue(fd, GPIO_Value_High);
        nanosleep(&sleepTime, NULL);
    }
}
I hope you found this tutorial useful. All of the information on this site is licensed under the creative commons. Share and share alike. Please gives us a mention or share our page with a friend. Thanks.
How would you implement the built-in sensors & leds in your design. How do you feel about cryptography? About 5G? 

Saturday, January 29, 2022

Star Proto Solderable Pref Board

Star Proto Solder Board 132 Tie Points (2 pcs) 

⭐At Bits4Bots, LLC we are designing an all new and anything but square, line of proto boards for electronic enthusiast! By offering a new look to general solderable pref boards we hope to inspire the next generation of STEM careers for grades K-12. 

Background: Soldering is the process of using a filler material (solder) to join pieces of metal together. With a brief introduction to electronic circuits a simple design using a LED, resistor, and battery can be joint together. A lesson on how to solder should also be consider. 

Our proto boards provide a canvas for students and hobbyist who are learning to solder. This product can be used with solder, solder flux and a soldering iron. Personal protective equipment should always be used.

Star Shaped Solderable Perf Board 132 tie points. Double-sided PCB board prototype for electronic circuits. Applicable to various DIP and electronic components.

What is it?

Star shaped perf solder board. 5 mounting holes. 132 tie points for a wide range of DIP and electronic components.

Why did you make it?

Provide a fun shaped solder board to the electronics world (both fun loving electronic enthusiast and kids) and to interest the next generation of STEM careers.

What color is it?

Yellow


Fun Facts: We use KiCad for our board designs. Autodesk Inventor software is used for 3D models. Boards are designed by a three person team. The Project Lead is an Electrical Engineer. The Tech Leads are visionaries and fun loving content creators.

Free enclosures are in progress to protect the fun shaped proto circuit. Visit us on Thingiverse.
 














Have comments or questions? Feel free to email us at bits4bots.gmail.com

I sell on Tindie

Follow us & never miss a new products or posts. 

Sunday, October 24, 2021

LabVIEW Multisim API Toolkit - RLC Values Example

Automate your Multisim design in LabVIEW 

Written by: Larsha Johnson
Date: October 24th, 2021

If you like designing electronic circuits in Multisim and would like to automate the simulation and analyses in LabVIEW, this example will walk you through how it can be done. The link below may help with missing NI module, Toolkit, or driver warning when opening VI errors.

Multisim Toolkit with LabView

The Multisim Automation API and the LabVIEW Multisim API Toolkit (which uses the API) recognize and can be used to control the values of all circuit parameters in the design. This lets you control most component parameters from the API.

This example uses Multisim version 14.2 and LabVIEW 2021

First open Multisim file RLC values from the blue sample folder → LabView Multisim API Toolkit.

















After the file is loaded into Multisim workspace, open LabVIEW, click the "File" tab and open the RLC Values vi as shown.









The simulation should run from here if all the necessary NI Modules, toolkits, and drivers are installed correctly. However, we will explore further by clicking the "Windows" tab and opening the associated block diagram. *The original design was modified by removing the blocks section "Multisim preparation" and replaced with a single "Select File Path" block form the Multisim Add-on tab. 

💬This may differ depending on software version.


If any errors should occur, in this diagram by block location is where they will be listed. From the LabVIEW front panel or from the block diagram, press the white arrow icon to run the simulation on the Multisim RLC Values circuit. 


This demonstrates how to sweep a resistor value to calculate a phase shift plot. (set to R2 by default)

In Multisim alternative analyses and simulations can be performed such as "Parameter Sweep", "Transfer Function", and "Pole Zero" to name a few.



🤔 Enjoyed this blog? Learned something useful? Consider following us for more content.

If you have errors visit this link: NI LABS TOOLKITS or comment if you find solutions to help others.

https://www.ieee.li/pdf/viewgraphs/circuit_design_simulation_and_virtual_instrumentation.pdf


Monday, September 27, 2021

Traffic Light in NI Multisim using Programmable Logic Devices (PLD)

Traffic Light in Multisim using PLC

Written by Larsha Johnson
9/27/2021

Programmable Logic Devices (PLDs) are integrated circuits that contain a relatively small number of functional elements that provide user-configurable logic functions (AND, OR, etc.)
In Multisim a PLD schematic contains specialized components that define the operation of the individual logic blocks of the PLD.

What is PLC and PLD?

The biggest difference between the two is the control logic. PLC is a fixed logic device (the function is realized by changing the software), and PLD is a variable logic device (the function is realized by changing the internal circuit structure). 

The concepts of PLC and PLD can be practiced through this two-way traffic light example. The main implementation of traffic light signals in to avoid traffic jams and serves the purpose of avoiding vehicular collisions.

The ladder diagram in this blog runs two traffic lights. The ladder diagram is contained in a separate hierarchical block called TrafficLightLogic

There are two different traffic light examples available, look in the sample circuit "blue folder icon" in the Educational version of Multisim that implements a traffic light:


  1. National Instruments\Circuit Design Suite 14.2\samples\Educational Sample Circuits\Ladder Diagrams
  2. National Instruments\Circuit Design Suite 14.2\samples\PLD Sample Circuits

The first choice uses programmable ladder logic with an actual traffic light simulation. For choice two, you can export the sample to program the NI Digital Electronics FPGA Board.

                     TrafficLightPLC.pngTrafficLightSim_snippet.png

Drag n drop these snippets directly into your Multisim workspace :slightly_smiling_face:

*I also attached a short version of the NI Multisim for Education PDF specifically for traffic light designs.


What is an SNIPPET file? Section of programming code saved in XML format; code snippets can be saved from Visual Basic, Visual C#, and Visual J projects; they can be edited using the Code Snippet Editor and managed using the Code Snippets Manager. 


Find the attached files below. Hope this helps!

This topic refers to education-specific features of Multisim.

About Raspberry Pi Pico W (WiFi Onboard)

July 1st 2022 💖We love new arrivals! The  Raspberry Pi Pico W  is a new tiny platform based on the  RP2040  silicon and it provides connect...

Popular Post