Category Archives: Hardware

How to make a USB flash drive Read-Only

Have you ever had to use a USB flash drive to install or update an Antivirus program on an infected computer only for your flash drive to get infected? I have, so I started to use my old 256mb USB flash drive, which has a manual switch on the side to make the device Read-Only, this allowed me to install or update the computer knowing that it couldn’t get infected. Some of these are still available, but, they cost a lot more than a standard USB flash drive.  I decided to look at how I could use a standard flash drive as my old 256mb flash drive is getting old, so I investigated for other possible solutions and I found that the diskpart command line tool that is available on Microsoft Windows computers (and it’s FREE) is able to make any flash drive Read-Only, this provided me with what I needed.

Here are the instructions on how to make a USB flash drive Read-Only.

  1. Start by running a command prompt (as administrator)
  2. Type “diskpart
  3. Type “list disk” and take note of the number for your flash drive
  4. Type “select disk [USB drive number]” e.g. “select disk 3
  5. Type “attributes disk” to display the settings (see images below)
  6. Type “attributes disk set readonly
  7. Type “exit“, all done you can now test the flash drive to see if you can add or edit the contents of it.

When you need to add files to the flash drive, you will need to clear the readonly flag. Repeat steps 1 to 5 and then type “attributes disk clear readonly” then “exit


Note: This method has been tested using FAT32, exFAT and NTFS file systems.

DISKPART command showing Read-Only flag is set to No

DISKPART command showing Read-Only flag is set to No

DISKPART command showing Read-Only flag is set to Yes

DISKPART command showing Read-Only flag is set to Yes


Matlab Simulink and Raspberry PI

Last week Mathworks held a Raspberry Pi workshop on site in the Merchant Venturers Building, they introduced us to using Simulink with Raspberry pi’s, I found the afternoon interesting and thought I would share the training material for others who couldn’t attend to have a go,  on the day we used Raspberry PI Camera module however, I have repeated the examples using a USB web camera (Logitech Quickcam Pro 9000 Web camera) and the examples worked just as well.


Simulink Raspberry Pi Workshop material – zip  Simulink_Rasp_Pi_Workshop_R2013b_R2014a_R2014b_R2015a_R2015b

Simulink and Raspberry Pi Workshop Manual – PDF Simulink_Rasp_Pi_Workshop_R2013b_R2014a_R2014b_R2015a_R2015b

How to setup Matlab Simulink and Raspberry Pi – PDF Installation instructions



How to update National Instruments myRIO firmware and Real-Time

myRIOThe National Instruments myRIO requires to have the same Real-Time module  installed on as the one that is installed  with LabVIEW to be able to use, if an old version is installed on the myRIO then when you plug the myRIO in the “NI myRIO USB monitor” will disable LabVIEW from the menu (see fig 1), if you are using the latest version of LabVIEW then you will need to update the firmware* or use an older version of LabVIEW.

* Updating the firmware will delete all code installed on the myRIO.

 Instructions on how to update the BIOS and firmware on the myRIO:

Continue reading