To connect from your local PC to your Raspberry Pi 2 follow the next steps:
- Check your Pi IP and/or computer name. (Default computer name is MINWINPC.)
- Search for PowerShell in Windows and run it with administrative privileges.
- Type: net start WinRM
- Type: Set-Item WSMan:\localhost\Client\TrustedHosts -Value MINWINPC
- You may need to click “Y” to allow this change.
- Type: Enter-PsSession -ComputerName MINWINPC -Credential MINWINPC\Administrator
- Enter the password which is: p@ssw0rd
You’re now connected.
For more complete and detailed instructions follow: http://ms-iot.github.io/content/en-US/win10/samples/PowerShell.htm
For those who want to install Windows 10 IoT but don’t want to install Windows 10 follow the steps below:
- Insert the SD card where you want to install Windows 10 IoT
- Format it to FAT32 if needed.
- Download Windows 10 IoT https://ms-iot.github.io/content/en-US/Downloads.htm
- Unzip the downloaded ISO and you should see a file called Flash.ffu
- Download the Windows 10 ADK at the end of this page: https://msdn.microsoft.com/en-us/windows/hardware/dn913721.aspx
- Search for Windows Imaging and Configuration Designer in your installed programs and run it.
- Where it says deploy (top left corner right under the title bar) click on the down arrow and select the device where you want to install Windows 10 IoT (either a USB drive where your SD card is or a removable drive if you have one in your computer.)
- Click on deploy.
- Select the Flash.ffu file you downloaded before and click open.
- Click next.
- Make sure the target disk is correct and click next.
- Click Flash.
After a few minutes you should have Windows 10 IoT installed in your SD card and you can now try it on your Raspberry Pi 2.
The new version of CLIArgsMadeEasy2 added support for VS2015RC. Grab it here while quantities last!
There’s a great little tool called TypeDoc that allows us to generate html documentation based in our comments inside our TypeScript files similar to what JavaDoc does. To use this tool follow these steps:
- Install nodejs: http://nodejs.org/dist/v0.10.35/node-v0.10.35-x86.msi
- Open command line and run nodejs by typing: node
- In the nodejs prompt install typedoc by typing: npm install –global typedoc
- Type: typedoc -t ES5 –out doc/ references.ts
This will compile all the documentation (classes, namespaces, functions, etc.) that can be referenced by the file references.ts and it will be put under the doc folder in the current directory where that command is ran.
It’s preferred to update your project’s documentation from time to time and TypeDoc has integration with tools like Grunt but if you want this to run after you create a build you can add this command to the post build events list of commands the way I’ve shown in the previous post. For example:
<Exec Command="typedoc -t ES5 --out "$(ProjectDir)/doc/" "$(ProjectDir)/tsDec/references.ts"" />
TypeDoc follows JavaDoc comment tags:
@param <param name> <description>
* This is a function.
* @param arg This is the argument.
* @returns Returns a value.
function func(arg: text): string;
* This is a name.
var name:string = "a name";
You can also use the @preferred tag if you have different comments for the same thing (e.g. a module that is declared in different files and has different comments in both files or an interface and its class implementation) and you want to use a specific comment over the other as TypeDoc will use the first comment that it finds.
You’ll notice that there’s a whole section that is commented out with this comment:
To modify your build process, add your task inside one of the targets below then uncomment that target and the DisableFastUpToDateCheck PropertyGroup.
Other similar extension points exist, see Microsoft.Common.targets.
So you just need to follow the instructions and add a command inside one or both of the pre/post build event xml nodes. To add a simple copy a file named lib.dll from the output directory to your project directory after building you’d do something like:
<Exec Command="copy "$(OutDir)/lib.dll" "$(ProjectDir)/"" />
Note: the " is intentional so that the string gets quoted when it’s used by the copy command.
– Are you using TypeScript?
– Please stop! Do yourself a favour and go learn TypeScript to use it in your project.
No problem, you just start slowly converting the code to TypeScript or you can create declarations (similar to a .h file for C/C++ projects) for your utility libraries that work just as well.
My TypeScript contribution to the world is a Player Framework (MMPPF) declaration file available at the DefinitelyTyped GitHub repository.
Enjoy and start using TypeScript!
Started playing with my Raspberry Pi this weekend and noticed that the wifi connection would not stay up for long when connected through SSH. After some digging online I found that the wifi was getting put in sleep mode. Here’s how to fix it:
- Create a new file named 8192cu.conf at the following location /etc/modprobe.d/8192cu.conf
sudo nano /etc/modprobe.d/8192cu.conf
- Write the following command
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
(This makes sure that the power management is turned off thus preventing the dongle from going to sleep mode.)
- You can go further and ensure that the connection remains up and stable by sending a ping request from your Pi to the router using crontab:
(Adds a new entry to crontab.)
- Enter the following at the end of the file:
*/1 * * * * ping -c 1 192.168.1.2
(Change the 192.168.1.2 to the IP of your router. The IP of the router can be found by opening a command prompt in Windows and running the ipconfig command and checking the number besides “default gateway“.)
If you don’t have a Edimax wifi dongle you may have to find how to disable the power management for your device.
CLIArgsMadeEasy is back with a long overdue update. This is the third major release of this extension although the second one didn’t receive a major version number.
This is still an alpha version. Please report back any bugs you may find.
- Dropped toolbar support in favour of toolbox which makes it more easy to manage and edit your command line. Open it inside View -> Other Windows -> CliArgsMadeEasy
- Remove or change between command line arguments with a click of a button.
- No more clogging the windows registry, data gets saved in .suo file.
- Detect startup project inside solution folders.
- Compatible with VS2012, VS2013 and VS2015RC.
- Added support for Visual Studio 2015.
- Added support for Visual Studio theme layouts.
- Fixed bug where pressing the delete key while editing an item would delete the item and not the next character.
- Added ability to duplicate and edit (buttons were added for each CLI arguments.)
- Changed the way CLI args get added and changed.
- Fixed VSIX problem for VS2012 installation.
- Fixed bug where deleting command line arguments wouldn’t set them in Visual Studio.
- Fixed bug where we could add the “Type some arguments”.
- Changed default shortcuts:
- ctrl+alt+0 – open CLIArgsMadeEasy window.
- ctrl+alt+9 – focus on command line arguments.
- ctrl+alt+8 – focus on project filter.
- ctrl+alt+7 – focus on command line history.
- Fixed VSIX installation for VS2013. Common installer for both VS2012 and VS2013.
- Fixed bug where changing CLI Args through project properties didn’t update the extension.
- Added empty CLI args when pressing enter with no arguments in the box.
- Added key shortcuts:
- ctrl+alt+0 – focus on command line arguments.
- ctrl+alt+9 – focus on project filter.
- ctrl+alt+8 – focus on command line history.
- tab – focus next command line.
- enter or space – select current command line.
- delete – removes current command line.
- escape – set focus on command line arguments.
- Fixed bug detecting when startup project was deleted.
- Removed erroneous menu entry from Visual Studio under Tools – You can find the tool window in: View -> Other Windows -> CliArgsMadeEasy
- Command line arguments text box expands to show full text.
- Added new icon.
Command Line Arguments Made Easy (CLIArgsMadeEasy) is a Visual Studio extension that eases the access and change of the startup project’s command line arguments. Instead of having to go to project properties or instead of using the command window to run your program with different arguments, CLIArgsMadeEasy adds a toolbox for you to add and edit your custom arguments.
If you like this add-in and want to support it, donate by clicking in the button:
Download CLIArgsMadeEasy2 v1.0.6 alpha here. (for Visual Studio 2012 / 2013)
Download CLIArgsMadeEasy2 v1.0.7 beta here. (for Visual Studio 2012 / 2013 / 2015)
Many thanks to Diogo Teixeira (aka fozi) for the add-in idea and testing of the program. And I also have to thank Matt Phillips for showing interest in the add-in which inspired me to make a second release.
Thanks to everyone who’s been reporting bugs and helping me building a stable version of CLIArgsMadeEasy.
I’ve used TTC (Toronto Transit Commission) to get to work and move around in Toronto. They implemented a good service where each bus is equipped with a GPS device transmitting its location and through today’s technologies that information reaches the internet and the phone of each one of us accurately and in real-time.
The apps available for WP7 didn’t have all the features that I wanted so I decided to build my own app.
Some features I wanted in my app that didn’t find in others:
- Fast access to favourites
- Map with routes
- Information for multiple cities
- Alerts (TTC only)
You can find the application here: http://www.windowsphone.com/en-us/store/app/realtime-bus/69bd4a05-65b4-4633-b40d-7d18d9f46edc
Some times it’s useful to debug if your new update breaks anything to users who have the previous version of your app. The process to debug this is not very straightforward but here it is:
– Create a package with first version (right click on the project -> store -> create package)
– Install the package.
– Run app and make sure it saves some user data.
– Make a new package with second version.
– Install package.
– On the Start menu, search for Debuggable Package Manager and then start it.
– A PowerShell window properly configured for the AppxDebug cmdlet appears.
– To enable debugging of an app, you must specify the PackageFullName identifier of the app.
– Type Get-AppxPackage at the PowerShell prompt (to view a list all apps that includes the PackageFullName.)
– At the PowerShell prompt, enter Enable-AppxDebug PackageFullName where PackageFullName is the PackageFullName identifier of the app.
– Run app
– Launch Visual Studio
– Go to Debug -> Attach to process…
– In the list of available processes select the one called WWAHost.exe and with the name of your app in the Title column.