Can someone please explain to me the basic flow of how this is done.
So currently I a USB pic programmer and also a multi pic adapter. I understand that I can use this to write my program to the PIC. But Im not sure what happens before that, like how do I actually test it with LED or some input sensor etc that gives out analog data?
This is what I have now: http://www.piccircuit.com/shop/pic-programmer/26-ica01-usb-pic-programmer-set.html
So I need to connect this to to a breadboard? And if so how? Im completely lost!! This is the first time that I attempt to do this. What I have done is use my Synapse RF Engine EK2100 to build what I want.
Now what...?
I'm not entirely sure what you're trying to accomplish but what you purchased is a programmer for PIC microcontrollers. After you have written some code whether in assembly or C and compiled it to a hex file, this device will put that code onto a PIC microcontroller that you buy separately. Have you purchased a PIC device to program or do you just have the programmer and the EK2100 kit? If you provide some more detail we can point you in the right direction.
Write a basic 'flash LED' program and then wire-up the PIC to see if it works.
Hot tip - use the internal oscillator to minimise the external component count (makes things simpler). Browse around a PIC savvy site like http://digital-diy.com/ to get lots of interesting ideas and code samples.
The community there mostly use PIC Basic type languages (such as Swordfish) that will land you code that looks something like this (header/setup removed for ease of explanation):
While True
High(LED)
DelaymS(500)
Low(LED)
DelaymS(500)
Wend
Related
I am trying to write and read from the EEPROM (25LC256) with my dsPIC 33FJ128MC804, I tried to use the examples from the website, however they used the explorer16 with the dsPIC 33FJ256MC710, so I take the code and I made the changes to used it in my dsPIC but I started to use interruptions, right now I can send data, but I am not able to read from the memory, even if I follow the steps in the datasheet of the EEPROM and using the configuration of the SPI.
Could you help me please with this little problem please?
UPDATE: I just noticed that whenever I send the code for read the STATUS register I always get zero as answer, is it normal?
source code: https://www.dropbox.com/s/wdahlmhjrilcqw6/main.c?dl=0
I've started using GPS for coding Ada at work - does anyone have any tips for getting the best out of the IDE? or any plugins I should be aware of?
For example is there a way to enable on the fly syntax/type checking - of the sorts you get in eclipse/visual studio where errors are underlined as you go?
Also what are people's general opinions on GNAT Workbench compared to GPS?
thanks
Matt
The GPS does not have a from of background syntax checking and that is by design. The idea behind GPS is that it is the compiler who decides what code is correct and what code is not correct. It means that if you want to know if your code is correct or not you have to compile it. On a Windows computer the short cut key for that is SHIFT+F4 and will only compile the specification or body file you are currently editing. Pressing F4 will compile your whole project. You will save time by using SHIFT+F4.
Another interesting feature is that the GPS uses cross-reference (XREF) information when navigation through the code. For example, let's say you would like to find all the places in your code where a specific subprogram is called. In GPS (GNAT PRO), right click on the subprogram you are interested in a press Find references. In the GPS GNAT Libre version you don't have a menu when right clicking in your code. In this case go to the Navigate menu and click on Find references there. If the GPS does not find any references and you know that the subprogram is used in the application it means that the XREF information needs to be updated. You may compile the whole application by F4 since the XREF information will be generated along with the binary that is produced. If you go to Edit and click on Key shortcuts you can set up a short cut key to generate the XREF information only. You may also find several interesting features there that you can set up a short cut key for.
The cross-reference information (XREF) is also used for refactoring (GNAT PRO specific functionality). It often works well for changing variable and subprogram names. Just make sure the cross-reference information is up to date!
Code snippets in GPS are also useful. You use them by writing a keyword followed by CTRL+O (not zero, O as in Orwell). To see the code snippets you can choose between go to Edit and click on Aliases. You can also create your own Aliases and code snippets to become a more productive Ada Software Engineer.
Good luck!
I do not think that GPS has a form of background syntax checking like Eclipse does, at least I haven't found it.
I wrote a small sized terminal program in GPS as my first Ada program and my opinion of it is generally negative.
The browser is very confusing and it is hard to find items you are looking for.
The editor has the nasty habit of adding a column to the left and removing it dynamically based on the item under your mouse. What that does is when you are trying to select text with the mouse, your text switches right and left by one character as you move which makes precise selection a difficult thing to do
Getting in the debugger involves too many steps and it generally moves your files in the editor to the EOF position when you set breakpoints, so you will do a lot of scrolling to go back to the sections of interest.
The debugger output looks fancy with all the graphical elements but it is also cumbersome to operate.
GPS offers better help features for Ada libraries though, it's generally easier to browse the standard libraries and check them out than in Eclipse.
All in all, if Eclipse works for you, you might want to stick with it or perhaps open both on the same project and switch to GPS for things like help etc.
I had a related question out here which is on hold now (as I expect your question will soon be due to it's broad content) but I did some research and I am generally dissatisfied with what is out there in the Ada field. The language is great but it suffocates under bad tools.
One last tip: You might want to try Slick Edit as it's text editor and browsing features are quite good, although they too have flaws with Ada (for instance the beautifier).
Good luck with your venture
I'm fairly new to programming and I've been presented with fairly daunting assignment at work. I need to build a program from scratch in order to take advantage of the Kinect's motion tracking capabilities to interface with another application.
Some context:
Someone else I work with has built the test program- a console app using OpenGL. The test program consists of a cube inside of a skymap. The camera looks at the small cube, and can be rotated around the cube to view it from different perspectives
Someone else was able to use the sample codes in the developer toolkit to control the test program. The test program now works with motion tracking (swiping your hand to the side rotates the cube; moving your head side to side changes the camera angle so it looks like you are looking around a floating 3D object; walking forward or backward zooms the camera). It works as it is, but...
The problem is this: Now that we know it all works, it's time to simplify everything so that we can run the test program on a tablet. So the code needs to be stripped down to the bare bones. We need to remove everything from the SkeletalViewer code except for the elements that gather and process the data, so that it can be used in another program.
I've been asked to build a console app from scratch (rather than tearing apart the sample code-as this is extremely messy) that allows us to use the Kinect with our test program.
I've spent the last few weeks trying to figure out the code and I'm feeling overwhelmed! I don't know where to start.
Here's my question: what are the absolute bare essential building blocks in the Kinect program? I do not need it to draw ANYTHING. I just need a console app that, when running, gathers the motion tracking data and sends it to the other program.
I would greatly appreciate any guidance you can provide.
Thank you in advance!!!
-JD
You don't need to draw anything, but there's a need to create an event for caching the frames in order to work one them.
Here's pretty cool description of skeletal joints: MSDN - Kinect
Another thing I can give you is the main page of Kinect project. Here are the libraries, guides, code samples etc. You can download and install Kinect Toolkit, there are several programs inside (binaries + code samples) - everything you need to learn Kinect API: Kinect For Windows - Downloads and Kinect For Windows - Learn
First, is there any good documentation for the btstack API's. I am trying to learn how to fully use btstack , send and receive data, look for devices within range and initiate connection.I am implementing this for MSP-430F5438A + CC2564 Bluetooth module.
http://code.google.com/p/btstack/wiki/MSP430GettingStarted
This website has some examples, but I am still confused, I need someone to break it down for me.Is there a template that I can start of. Anything would be helpful. If there is a step by step reference on how to connect to a device and exchange packets, it would be really great. Thanks is advance
In the regular "GettingStarted" page is a little explanation on what goes on in the packet handler, which is the main part of where you basically put all of your new code.
Im new to this forum so be nice ;) i have followed rules :)
I am helping the dev for my kernel that I use. Since the mod I want is mainly only for me i figured its my duty to get it working myself.
The problem:
I have edited my *.kl files to disable the five front facing hardware buttons from waking the device and only allow the volume up / down buttons to wake the device as the front facing buttons get pressed when its in my pocket.
However, even though the front facing buttons no longer turn on the device , when they get pressed they light up adding an extra 6mA drain .
What I've tried:
I wrote an apk to change the permissions of the /sys/class/leds/button-backlight/brightness file to keep them off. Despite the program working , permissions allow the file be edited, causing them to light up.
What i need help on:
I downloaded my dev's kernel using git and I want to edit the kernel myself to keep the button lights off during sleep . However kernel code is not my comfort zone .. so i need help .
Thanks everyone for helping and simply just reading !
1) Messing with code is a bad idea (especially if you lack skill and don't know C and UNIX).
2) what you are probably looking for is script that will run on startup (initrc) and there you need to set it and change permissions using chmod command.
Thus you need to Setup what you want (with echo command presumably) -> change permissions so file can not be rewritten (chmod) -> put two commands in initrc.
Kernel can be like any other configured using make menuconfig and then compiling it, in that case you just disable stuff that you don't like.
[OT] I may be off though, your (original) question (there was no question mark) did not make too much sense here and there. Read this howto: How To Ask Questions The Smart Way from Eric Steven Raymond. Thanks.