Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Saturday, January 20, 2018

10-Second $10 Upgrade to Triple Your Raspberry Pi 3 Network Speed


Subscribe by Email!
By Gabriel Staples
Written: 20 Jan. 2018
Last Updated: 20 Jan. 2018

Site Map/Table of Contents



tldr;

Buy one of these USB to Gigabit Ethernet adapters for $10, plug it in to your Raspberry Pi 3 and voilá! Your new Pi 3 Ethernet connection is now 3x faster than the built-in Ethernet port and 12x faster than the built-in WiFi adapter (source: see my test results below)!

This really matters when you're using your Pi 3 as a network device, server, router, hotspot, NAS, or remote development machine. Pretty much it really matters whenever you want it to work better on your local or wide area network, which includes ssh-ing or otherwise remoting into it.

Details:


***Subscribe by Email!***

Monday, October 23, 2017

Which Programming Language Should I Learn?


Subscribe by Email!
Investing time into learning a first (or new) programming language is a seriously-time-consuming endeavor. For me it wasn't something to take lightly, as I knew I'd be investing thousands of hours into any given single language when I began. When people ask which programming languages they should learn or use, a great way to make recommendations is to consider these 3 things:
  1. Popularity
  2. Is it a scripted (interpreted) or compiled language, and how does that affect what I want to do with it?
  3. Which languages are most used in my industry or application?

1) Consider the popularity of languages. The more popular the language, the higher the priority it should be, within reason, since that's what industry uses and that's where you're going to find the most resources, help and support, compatibility with others, and jobs. The TIOBE index is the place to check:
"TIOBE programming community index is a measure of popularity of programming languages, created and maintained by the TIOBE Company based in Eindhoven, the Netherlands.[1] TIOBE stands for 'The Importance of Being Earnest' which is taken from the name of a comedy play written by Oscar Wilde at the end of the nineteenth century.[2]" (https://en.wikipedia.org/wiki/TIOBE_index).



Here's the index for 2017: https://www.tiobe.com/tiobe-index/. As shown above, the top 6, in this order, are:
  1. Java
  2. C
  3. C++
  4. C#
  5. Python, and 
  6. JavaScript. 
My top 3 recommendations are Java, C++, and Python, but not necessarily in that order. When it comes to you and your personal needs, goals, and desires, however, you need to choose for yourself! Here's some tips to help you make that decision.


***Subscribe by Email!***

Monday, July 11, 2016

Arduino-like millisecond (ms) and microsecond (us)-resolution timestamps in Python: millis(), micros(), delay(), & delayMicroseconds()


Subscribe by Email!
By Gabriel Staples
Written: 11 July 2016
Last Updated: 22 Oct 2016
History (newest on top):
-posted updated code (v0.2.1) with Linux functions too (not just Windows) - 22 Oct. 2016

Other Articles:
Below, I show some code for basic Python millisecond (ms) and microsecond (us)-resolution timing functions. I made these to resemble Arduino functions I am already familiar with. Since these functions use the Windows API's QueryPerformanceCounter and QueryPerformanceFrequency functions, as-written, they work for Python in Windows only. If you decide to adapt them to Linux, please share how you did it in the comments section. Update (19 Oct 2016): I have updated these functions to work with Python in Linux now too! See below.

Functions and code samples. Functions include:
micros()
millis()
delay()
delayMicroseconds()

***Subscribe by Email!***