Is GpioPinDriveMode.InputPullUp and GpioPinDriveMode.InputPullDown Supported? - raspberry-pi

When writing a Windows Universal App to run on a Raspberry Pi 2 with Windows 10 IoT I would like to have my input pin as a PullDown input. The GpioPinDriveMode enumeration includes input pullup and input pulldown as shown here. My concern is that the Visual Studio 2015 intellisense is showing a "not supported" tool tip when using the pullup or pulldown enumeration. Is it in fact not supported ?

The short answer to your question is yes - but you can also always verify this in your code as well.
E.g., in C#:
if (buttonPin.IsDriveModeSupported(GpioPinDriveMode.InputPullUp))
blah, blah, blah
HTH.

Related

How to show the type of a variable in Visual Studio Code in the editor

I'm wondering which setting needs to be enabled in Visual Studio Code so that the variable type is viewed besides the variable declaration in the editor. On my Mac this works perfectly, on my Raspberry PI it does not work and I can't remember what I have done on my Mac to make this works. In my case I ask for Rust, but I guess this is a general setting in Visual Studio Code for all programming languages. The problem is that I have no clue what this editing / viewing feature is called and therefore it's kind of hard to search for this.
Below an example: the editor views the data type for square, which is in this sample [f64; 4].

Simulink Raspberry Hardware External Mode Error Issue

I have a problem using Raspbery Pi hardware and Simulink, shown by the pictures below.
I'm tring to control an LED and GPIO pin on the Raspberry Pi.
I click Build, Deploy & Start. It works.
But then I click Monitor & Tune for monitoring signals.
It produces an error which I cannot find a solution for.
I tried different versions of Matlab but got the same error.
My hardware settings are just like in this link: https://www.mathworks.com/help/supportpkg/raspberrypi/examples/communicating-with-raspberry-pi-hardware.html
In addition I tried to click connect on external mode panel and the result is the same, the error is same.
Do you have any suggestions?
[Cross posted from Matlab Answers].
Check your matlab search path. You have the support package 2019a and 2019b on your search path. Add only the one matching your matlab version.

Controlling VS code with a launchpad

I really enjoy using vs code but there are some many shortcuts to remember and every new plugins come with a new set.
Of course, I can use the command palette in order to quickly execute a command, but I would like something even more faster such as assigning a shortcut to any of the keys for a device like a Novation Launchpad midi controller.
Stackoverflow is maybe not the best plase to ask this question but I didn't knew where to post it, so is there anyone who tried something like this? I have seen this video (https://www.youtube.com/watch?v=LOyNUGS4RC8) linking such a device with visual studio so perhaps someone created a software dedicated for vs code already.
Regards,
Johnny -
I've setup this with MIDI Loupe and midiStroke.
MIDI Loupe listens your device and logs channel/key/value you just hit on your midi controller - with this tool you inspect your device's output.
Then in midiStroke you map controls to shortcuts.
Note: I've found my midiStroke setup for M-Audio Axiom 49 keys don't require values (only key number) but controls (e.g. record start) do require it. Also for me letter keys didn't not work if uppercased (e.g. for garageband recording start I need simply R button hit and R should be r in this case)
Detailed tutorial here

Voice coding in Emacs on Mac OS X

I would like to be able to write code by voice recognition and him currently using Aquamacs 2.4 and Dragon Dictate 2 on Mac OS X 10.6.8. Does anybody know if this is possible and if so how? I've seen shorttalk, emacs listen, and voice code but they only work on windows machines with Dragon Naturally Speaking.
Any leads would be much appreciated.
Also I am writing in R via ESS.
Have a look at this presentation by Tavis Rudd : http://www.youtube.com/watch?v=8SkdfdXWYaI
He runs Dragon Naturally Speaking inside a Windows VM, because the Windows version can be scripted with Python. Then the VM communicates with Emacs on his local machine.
He says in the presentation he will open source his code, but it doesn't seem to be there yet on his Github.
So yes, it's possible, but at this point there is no out of the box solution. If you really want this, prepare to invests weeks or months to get to a properly working setup.
I recently released the coding-by-voice solution I created to solve my own RSI issues. It can be found here: http://www.voicecode.io
I use it mostly for coding in Sublime Text and Xcode, but it works great with emacs or vim as well. The great thing about this solution is that all commands can be chained into "command phrases" so you don't have to pause between every individual command like you do with other voice command solutions.
It has builtin support for all standard variable-name formats (snake case, camel case, etc), has builtin commands for every permutation of keyboard shortcuts (ie command-shift-5, command-option-shift-T, and so on), has cursor movement commands, app switching commands, window switching commands, commands for symbol combos like "=>", "||", ">=", etc, and tons more. Plus it is very easy to add your own custom commands as well.

In WIN 8 DP- How to set output audio device to speaker instead of USB using powershell

I have gone through many of the forums "To set output audio device to speaker instead of USB" in Windows 8 DP. but i could not find any solution how to do this using powershell. can some one help me in this ?
Sounds like you want to script changing your audio output device. You can do this via the registry. See this blog post for a script that does this:
http://www.ademiller.com/blogs/tech/2008/12/switching-audio-input-and-output-with-powershell/
This may not invoke a change immediately like the applet does. For that you might have to invoke the API and it doesn't look like it's easy.
Someone made a little command line program implemented in C++ you can download the source and binary here:
http://www.daveamenta.com/2011-05/programmatically-or-command-line-change-the-default-sound-playback-device-in-windows-7/
It didn't run on my Windows 7 system but that may be because I don't have the correct Visual C++ redistribute installed. You might try this version if you get an error running it.
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=29