A good alternative to Win32DiskImager? We've not tried it yet but there's a link to an artical here: http://www.rs-online.com
All posts by
RPi Zero Availability
Is volume manufacture coming? September 2016 Email from RPi Foundation At the moment the Zero is limited to one per customer. At present we are focusing on getting the Zero into the hands of individuals and will not be offering a wholesale option in the near future. For industrial purposes we recommend the A+. April […]
RPi Zero Hardware General Specifications
Official Raspberry Pi Page https://www.raspberrypi.org/products/pi-zero/ Core Differences To The Raspberry Pi 2 Broadcom BCM2835 (as in Raspberry Pi 1, but @ 1GHz) single core processor instead of newer quad core BCM2836 (RPi 2). 512MB instead of 1GB RAM. Processor Broadcom BCM2835. This contains an ARM1176JZFS (ARM11 using an ARMv6-architecture core) with floating point, running at 1GHz, and a Videocore 4 GPU. Memory […]
Reboot
Reboot From PHP Page <?php //—– DO THE REBOOT —– //THIS SUDO COMMAND NEEDS TO BE AUTHORISED FOR APACHE TO USE IT IN THE FILE: sudo nano /etc/sudoers // # Special for this system – let apache run exes we use in the web interface // www-data ALL=NOPASSWD: /sbin/reboot echo '<pre>'; system("(sleep 2 ; sudo […]
Keyboard Input
Getting input from the keyboard via the command line #include <iostream> #include <string> #include <sstream> using namespace std; string entered_string; float my_float=0; int my_int=0; //Get input cout << "Enter something: "; getline(cin, entered_string); //Convert and display it stringstream(entered_string) >> my_float; //Will be 0 if invalid stringstream(entered_string) >> my_int; //Will be 0 if invalid if (entered_string.compare("4") […]
Text Files – Viewing
Viewing Text Files head – View the start of a text file Show the first 20 lines: head -20 /home/pi/mytextfile.txt tail – View the end of a text tile Show the last 20 lines tail -20 /home/pi/mytextfile.txt
fping
fping gives you more options than standard old ping sudo apt-get install fping The options are details here. Example – Single ping with a not too long timeout: fping -c1 -t750 www.google.com
Troubleshooting
Can't connect via Netbeans See the Troubleshooting Remote Host Connections tips here. Debugging execution allways stops but there's no breakpoint there? Try clearing all breakpoints (there may be old ones pointing to dead code) Menu > Window > Debugging > Breakpoints. Right-click in the Breakpoints window and select Disable All. "GDB has unexpectedly stopped with return 1" […]
Using Strings-Extracting
Get Section Of A String some_other_string = my_string.substr(8, string::npos); //Copy from character 8 to the end Get String After String my_string = my_string.substr((my_string.find("inet ") + 5), string::npos); Get String Before Character my_string = my_string.substr(0, my_string.find('/')); //Will return existing string if character not found Convert ASCII string of hex values to binary array example code […]
sudo
Becoming the root user Which users are allowed to use sudo You can use this command to open the sudoers file: sudo nano /etc/sudoers BE VERY CAREFUL TO COPY THIS FILE BEFORE YOU CHANGE IT – IF YOU MAKE AN ERROR YOU CAN STOP YOURSELF BEING ABLE TO OPEN THE FILE USING SUDO (changes to it […]