Usual disclaimers: I'm not a doctor, legal professional or financial advisor. This article is for information/education only and reflects my own opinions. It should not be taken as financial, legal or medical advice. Do your own research and never invest anything you cannot afford to lose (including your time).
Showing posts with label Pi. Show all posts
Showing posts with label Pi. Show all posts

15 March 2021

Pi Coin

In my previous post I hinted at a rekindled interest in cryptocurrencies and then seem to have gone into my suspicions about the NFT art market. It's time to balance that with my thoughts about Pi Coin.


Anyone can download and run the Pi Coin app on their mobile phone. Unlike BitCoin mining, you don't need a massive server farm to start earning the coins. There are aspects and critics which might make you think it's a scam but is it? It's unusual for a scam to tell you exactly who is behind it.


One thing Pi has going for it is a link to Pi day (3.14) so every year provides an opportunity for computing professionals and educators to discover the network. It has nothing to do with the Raspberry Pi although I suspect with the right software you could use one to mine the coins since essentially it is the taking part that counts, not the ability to throw powerful computing equipment at it.


I only signed up a couple of days ago but I have already accrued 7 pi and seem to be building the pot up at a rate of 2.4 pi per day. For my part, all I have to do is open an app and click a button once per day. Of course there is no guarantee that my coins will ever be worth anything. Today I have tried 3 times to verify my account by sending a SMS message and each time this has failed. Well I have plenty of free texts and this claims not to add any additional charges so time will tell. There is an option to verify using a Facebook account too but I find Facebooks involvement with analytics companies and sowing trackers all over the web to be against my resistance to them tracking me. Selling my details off without my consent or any form of reward for taking part to their customers just repulses me from using their network. At least with Google I get useful free software so I guess I'm ok with being tracked as long as there is value for me (I have my own cats and don't need Facebook for this :P)


Can Pi Coin create enough worth to accrue value or are these free coins going to be worth less than the Nectar points I pick up without trying at Sainsbury's (a UK supermarket chain for those who might not know). Of course something given away for not much should be viewed as having low value but my previous post explains how I thought the same about BitCoin many years ago and now wish I had backed up the wallet I made way back then. The truth is we don't know for sure. There are clearly a lot of people willing to give it a chance as there are sign-up codes all over the internet for anyone who needs a referral code (which is essentially the nickname of another Pi Coin miner). Does the world actually need another crypto-currency when you can already pick from over 130 which are already established?


I think yes but lets be honest, it's because there are no barriers to earning coins. The reason I would not mine BitCoin now is because I have an understanding that I need a server farm for it to be anywhere near worthwhile and the cost of running that farm might outweigh the returns. I think any future crypto should have the same level of mining for new users that was given to the early adopters with declining returns later on in line with the law of diminishing returns. Now many people are going to ask why should they earn at a lower rate when they gave their support early on when it was most needed? I believe the initial higher interest rate for savings accounts works for mainstream financial institutions for the same reason. People need a reason to buy-in. With crypto maybe a similar approach would counter the MOSFIT mindset (Missed Out So F*** IT). Driving away potential users can't be good for anyone in the long term. The spending power of money in our high street banks is similarly reduced if nobody wants or has confidence in our national currency.


I have read comments about the multi-level-marketing nature of Pi Coin referrals meaning it must be a scam. After all MLM is bad and free coins for being honest about our online identity in this mix must mean it's a scam right? After all you can verify your identity with Facebook who know more about you than the CIA even if you don't have a Facebook account. I remain undecided at this point but will wait until I am asked for whatever is required by their identity verification system. Mainstream banks insist on proof of your identity just the same. If anything, taking this pre-emptive stance adds a bit of credibility these days. I am reminded of how another previous work colleague signed up for a Monzo(?) bank account and they wanted a picture of him holding his bank card for verification. To me this is invasive given modern facial recognition systems. Still, I have my hat, shades and facemask at the ready just in case.


The big question is will Pi Coins ever have value and if so, how much? When people on YouTube are finding ways to trade with them already, there's a chance they will. We can't know how much the Pi network will earn from our data or showing us adverts and how much of that will be eaten away by set-up and running fees but there is potential for some value as the network of verified users expands. Will advertisers switch to an alternative network of Facebook verified users rather than just using Facebook itself? Well they might consider it if they want the attention of people like me. Only time will tell. For now we must wait and see what happens. At least we can use the time to research further and keep an eye on the test ledger while we wait for Pi to go live.


[Disclaimer: I am not a financial adviser and I am not suggesting you sign-up for the Pi Network or any other crypto-currency network or MLM scheme which is why I am not posting my own referrer code here. I have researched the topic for myself and decided I will give it a go. If anyone reads this and decides for themselves to do the same, you can use a search engine to find a referrer code from the internet - there are loads published and this way I know you are not basing your decision on my ramblings alone which do not constitute or replace proper financial advice]

4 July 2014

Raspberry Pi for Secret Agents

I've had one of those rare luxuries this week; a couple of spare hours to go through something I've been meaning to try out for a while. Yes I've got hold of a copy of the Raspberry Pi for Secret Agents book and the task of creating a custom SD card for our Pi lab to accompany the book.

The Pi lab is really starting to take shape and we have more equipment coming later on this year. I'm currently working on a Minecraft install with python API, finishing off the old recycled recycling truck time-lapse-dolley using a Pibrella and a few additional bits & pieces, but today belongs to the secret agent book.

To start with, I was getting on well with the book and setting bits up while waiting for some components to arrive. To do the audio exercises in chapter two, you really need a USB microphone, so I installed the packages, ordered one and put this project on the back burner again while I waited for snail-mail to arrive. Luckily it arrived yesterday which coincided nicely with a very rare quiet spell so I went back to chapter two

I noticed there were some flaws in the chapter. Some alias commands did not seem to work, they would not survive a reboot and I got errors when I tried to play back a recorded mp3 file using SoX (even though the file appeared to be created ok). There were also some things missing, like how to stop a recording (CTRL+C seems to work. If you're getting lock-ups from trying to fix the aliases, you can also try CTRL+X or CTRL+Z).

Lets start with fixing the main problem then. If you manage to get SoX to record and pipe it to Lame, you end up with a file that you can't play back and you get the error message "no handler for file extension mp3". I eventually found a fix for this which is: sudo apt-get install libsox-fmt-mp3 It seems the author must already have this (or something similar) installed. That should get those mp3 files playing.

The next issue for me was the Alias commands refusing to survive a reboot. The author suggests adding them into ~/.bash_aliases. I tried this and the commands were there in the file after reboot but didn't seem to work after I logged out and logged back in again. I came across this forum article about a custom message of the day (motd) which I thought would be good for us to use to provide some help to anyone using the card. It not only provided the inspiration for our own custom message, but also got me thinking 'well if that gets displayed to anyone logging in then any commands I put in there will get run as well'. It uses a file called ~/.bash_profile and if you put aliases at the end of that file they will indeed be there and usable by the person logging in. I then decided to customise this a bit further. I can see no point having weather information on a terminal which is right next to a window but I figured the one thing which is missing from that script is the infinitely-more-useful SD-card free-space remaining. I have added this bit in quite a crude way (using grep with character offsets discovered by trial and error)

Anyway here is my current .bash_profile in all it's glory. No doubt I will come back to this at some point. I also used Sudo mkdir ~/agent to create a working directory but you can skip that bit if you remove the last line of this script (cd /home/agent).

let upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)"
let secs=$((${upSeconds}%60))
let mins=$((${upSeconds}/60%60))
let hours=$((${upSeconds}/3600%24))
let days=$((${upSeconds}/86400))
UPTIME=`printf "%d days, %02dh%02dm%02ds" 
"$days" "$hours" "$mins" "$secs"`

# clear the screen
clear

echo "$(tput setaf 2)
   .~~.   .~~.    `date +"%A, %e %B %Y, %r"`
  '. \ ' ' / .'   `uname -srmo`$(tput setaf 1)
  .~ .~~~..~.   
  : .~.'~'.~. :   Uptime.............: ${UPTIME}
 ~ (   ) (   ) ~  Memory.............: `cat /proc/meminfo | 
grep Memfree | awk {'print $2'}`kB (Free) / `cat /proc/meminfo | 
grep MemTotal | awk {'print $2'}`kB (Total)
( : '~'.~.'~' : ) IP Address.........: `/sbin/ifconfig eth0 | 
/bin/grep "inet addr" | /usr/bin/cut -d ":" -f 2 | 
/usr/bin/cut -d " " -f 1`
 ~ .~ (   ) ~. ~  SD Space left......: `df -h | 
/bin/grep "rootfs" | /usr/bin/cut -c 28-34`
  (  : '~' :  )   
   '~ .~~~. ~'    

Agent Pi: Our SD card to accompany the 'Raspberry Pi for Secret Agents' 
book.
Read the section on tmux (p34) before you start.

Extra packages installed: tmux, sox, espeak, lame, vorbis-tools

This message is:/home/pi/.bash_profile 
Use Alias to list shortcuts   
"

#back to white
echo "$(tput setaf 7)"
#(0)Black (1)red (2)green (3)yellow (4)blue (5)Magenta (6)cyan (7)white

#Alias commands here as .bash_aliases does not seem to work for some reason
alias recordmp3="sox -t alsa plughw:1 -t wav - | lame - "
alias record="sox -t alsa plughw:1 -t wav - | lame - "
alias recordwav="sox -t alsa plughw:1 -t wav - "
alias recordogg="sox -t alsa plughw:1 -t ogg - "
alias recordflac="sox -t alsa plughw:1 -t flac - "
alias play="echo 'use sox filename.ext -d for playback'"
alias encmp3="lame - "
alias encogg="oggenc - "
alias micvol90="amixer -c1 sset Mic 90"
alias micmute="amixer -c1 sset Mic 0"   
alias headphones="amixer cset numid=3 1:"
alias hdmi="amixer cset numid=3 2:"
#go to working directory
cd /home/agent


If you're wondering how I managed to get this hidden profile off my pi, just copy it as a text file first (cp ~/.bash_profile bash_profile.txt). Then you can use WinSCP to grab it from a Windows machine. If you're trying to go the non-M$ route, you can start up Midori on the Pi and upload it to Google docs (or more likely pastebin :) ).

7 May 2014

Still no replacement blog as yet... sometimes things get in the way

Like my old Samsung NC10 netbook still having Windows XP on it. No M$ I will not buy another version of Windows for it as I still think XP is the best one you've ever done.

This lead me to a new alternative and I wanted to sing the praises of LinuxMint. I've been using this since version 12 to reset lost Windows passwords but this will be my first attempt to use it as a replacement for XP. It's a nice bridge between Windows and Linux and installation was a breeze. I downloaded an iso and booted it on an old PC. From there it let me install it to a USB stick which my NC10 was quite happy to boot from so I now have Mint with the Cinnamon desktop which is pretty impressive. Only hitch so far is that I can't get the Disks utility to create backup images of my SD cards (error g-io-error-quark, 13 mean anything? anyone? @cport80). I'm going to use this PC in our Pi lab so backing up SD cards has been a down-time project for a week or two. At one point I even considered making myself a custom Pi case with a couple of USB connected SD-readers for this very purpose. Anyway I was quite impressed when I discovered the Disks utility had an option for backing up to an image file and no doubt the issues will be resolved in time (next update?).

I have been having some issues with backing up SD cards for our Pi lab as SD cards from differing manufacturers seem to have slightly different capacities which comes to light when you try to use dd to backup the cards. It frequently reports there is no space left on the drive when you try to transfer the image. I found a forum post with the answer though and this appears to work in Mint. Download the Gparted partition manager and then with the SD card installed but unmounted, select the SD drive and use the resize partition option. I chose to shrink the ext4 partition, leaving a nice big 512MB block of unused space at the end of the card and then applied the changes. Then I used the usual dd command line to transfer the data to an image file. Swap cards and reverse the in/out file options and even though dd still reports a lack of space during the write, it has booted up fine on the Pi.

Nice to see the fix works on the Linux platform after trying various Windows tools (Win32DiskImager, Roadkil's Disk-Image utility, the official SD consortium format utility and another SD formatter which I think originated via HP). Hope this is helpful to anyone out there still struggling with this issue and thanks go to Gary A Stafford for his post. Incidentally he references the Pixhawk website as being helpful to him (but it was his Gparted post which got things working here - so thanks Gary).