Monday, September 2, 2024

Baofeng UV5R Simplex Repeater (VOX)

Let's start off with the list of it items that we'll need:


 Materials:

  • Computer:
    • Laptop/Desktop Running Windows
  • Radio Piece:
    • 1X Baofeng UV5R 
      • Technically any radio that will do VOX
    • 1X 2.5mm-to-3.5mm Audio Cable ( or adapter)
      • 3ft is good
    • 1X 3.5mm Audio Cable
      • 3ft is good
    • 1X Ground Loop Isolator
      • https://www.amazon.com/Packs-Ground-Isolator-Stereo-System/dp/B0B2JSN8NR/ref=asc_df_B0B2JSN8NR/
      • Mine is labeled 'Jabinco' But these will do. 
    • 1X USB Sound Card
      • https://www.amazon.com/gp/aw/d/B00IRVQ0F8
  • Software:
    • http://f6dqm.free.fr/soft/simplex/en/simplex.htm

Steps:

1- Configure VOX on UV5R ( I have it on Level2)

2- Install The Simplex Software. 
Familiarize yourself with it. While there are many options we'll only be using the repeater function. 

3- Plug in your USB Sound card and test it. 
I'm sure you have some headphones and microphones lying around. 

4- Plug stuff in.
2.5mm Baofeng Plug --> 2.5 to 3.5 MM Coupler --> Microphone In on USB Sound Card
3.5mm Baofeng Plug --> Ground Loop Isolator--> Speaker Connection on USB Sound Card

Troubleshooting:
- Make sure that the audio output and input are correct
- Try out different volume settings on both your computer and the Baofeng radio
-- One thing that I decided to do was to mark the location of the volume sweet spot. 
- Hit Auto On. 

Wednesday, August 28, 2024

Web Scraping With Python ( To display on LED Matrix)

 I had the opportunity to (semi) work with LED matrices at my place of employment, which led me to tackle this project here. I have set up this page here: https://techtucson.com/learning/scrape which we'll use as a real-world example. 

  • Download the page as an HTML file and save it to your computer as scrape.htm.
Our first task is to separate the first ROW and display how many spots are available. 


///
import pandas as pd

url = 'file:///C:/Users/mariouribe/Downloads/scrape.htm'
tables = pd.read_html(url)
df = tables[0]
first = (str(df.loc[0, 'Spots Available']))
new_string = first.replace("spots available.", " ")
new_string2 = new_string.replace("/", " ")
firstnumber, secondnumber = new_string2.split()
subtract = int(secondnumber) - int(firstnumber)
print(subtract,  "Spots Available")
///

Great , we have a working POC, but there's only one problem. The Microcontroller are not as powerful as my machine. While they have access to the internet are running MicroPython which means I won't have access to Pandas or better yet BeautifulSoup. I'll need to use built in libraries as much as possible. Back to the drawing board. 

///
import requests
import re

url = 'file:///C:/Users/mariouribe/Downloads/scrape.htm'
response = requests.get(url)
html = response.text

pattern = r'<td>(.*?)</td>'
regex = re.compile(pattern)
results = regex.findall(html, re.IGNORECASE | re.DOTALL)
garage = results[0]
numbers = results[1]

numbers_new = numbers.replace("spots available.", " ")
print(numbers_new)
numbers_new2 = numbers_new.replace("/", " ")
print(numbers_new2)
firstnumber, secondnumber, thirdthing = numbers_new2.split()
print(firstnumber ,  "Spots Available at ", garage)
\\\

So I got this working with the requests and regularExpressions library. But know there are a couple of more issues, some of the functions of the re library don't seem to exist in MicroPython :( , and I ran out of space while getting the reponse.text output. 

That's when I reached out to the developer and asked for a handout. An API was built where I can call a specific garage and get 20 lines of text which I can now parse without issues. 

More to Come Soon. 

Saturday, August 17, 2024

Raspberry Pi Pico RP2040-ETH

I've always been interested in Arduinos, Microcontrollers, and SOCs. I recently went on AliExpress, purchased some new devices, and rounded up the things I had previously purchased. This article will focus on the WaveShare RP2040-ETH (https://www.waveshare.com/wiki/RP2040-ETH) which is a "RP2040-ETH is a mini RP2040-ETH development board, which integrates TCP/IP protocol stack for network communication." 

I found this Github Repo: https://raw.githubusercontent.com/nichokap/RP2040-ETH which I will use as a starting point, and grow from there. Let's get started with setting up the device, I won't bore you with instructions and firmware that is used as you can take a look at the WaveShare site and the above Github for that portion. 

1:
Now that everything is set up, let's do something with the board. Let's go into Thonny and start with the "Hello World" right of passage. 


2:
Well, that was fun, can we make the board do something? We can use an RGB LED on the board. 


from machine import Pin
from neopixel import NeoPixel


#Configure the built-in WS2812 LED pins of RP2040-ETH and set the number of LEDs to 1
strip = NeoPixel(Pin(25), 1)

#Set the color of the first and only LED
strip[0] = (0,150,0) # color codes in GRB (Green=0, Red=150, Blue=0)

#command to write the color to the LED
strip.write()

This code is from nichokap mentioned above, we see it's importing the PIN and NeoPixel (modules or libraries) items. The 'strip' variable is defined using pin 25 which is the LED, and the notes in the code mention that we are letting NeoPixel know it's only 1 LED. strip[0] I believe is referencing the 1st LED as index starts at 0. The first time you run the code, you'll see the LED turn red. Now try to change the Number combinations, (150,150,150) will give you a white LED.

But I didn't buy this because it has 1 LED, I bought it because it had a Network Port, and I can use MicroPython. That's where I think I chewed more than I could swallow. Before I go off on a tangent, let's move on to the next sample code. 

3:

Monday, August 12, 2024

Meshtastic LORA

In early 2022, I ordered three (3) Lilygo LoRa32 V2.1 1.6.1 modules. Then I flashed them with Meshtastic sent messages between the nodes and called it a day. Fast forward a couple of years, and the local community around Meshtastic has grown. While this post is currently a placeholder here are some of my current projects around Lora:

  • https://techtucson.com/mesh
  • https://github.com/TechTucson/TC2-BBS-mesh
    • I have really enjoyed working on this project and I may just turn this into it's own post. 

Local sites and resources:

  • https://meshtucson.systm32.xyz/
    • Tucson Meshtastic Site
    • Discord
      • https://discord.com/invite/ruAQEVpUV4
  • http://azmsh.com/
    • Redirects to Discord Invite
  • 32Mesh.net
    • Saw this driving around 
Keep Tuned for More. 

Baofeng UV5R Simplex Repeater (VOX)

Let's start off with the list of it items that we'll need:  Materials: Computer: Laptop/Desktop Running Windows Radio Piece: 1X Baof...