Thanks for the tip, I went back and changed all function returns and parameters to unsigned and multiplied the integer output by 1.411 to get 0-360 degrees output on my LCD.
Type: Posts; User: Lince
Thanks for the tip, I went back and changed all function returns and parameters to unsigned and multiplied the integer output by 1.411 to get 0-360 degrees output on my LCD.
Yes looking back a character is used to store a value from 0-255;
I added this code in the main and things are closer and i'm seeing the actual numbers
z = (int)testChar;
...
Hello all,
I'm using a digital compass for a microcontroller project, that displays the direction the compass is facing on an LCD. I've gotten it working to the point where it displays 0-255 on...
I've tried every combination of pointer that I could think of and couldn't get anywhere. I have made other functions where a value is passed back to the caller and assigned to a local variable in...
I tried including gps_read.h in the main but no go. I'm trying to stay away from extern if i can but I figured I would give it a try just to do some troubleshooting. Maybe it's a compiler issue,...
no I didn't include the gps_read.h in the main source I'll try that. I have made distance a local variable in gps_read.c and then tried it as a global in gps_read.c and deleted the header file and...
Hello
I'm having a problem with this code I'm stumped as to why the function Get_Distance() is returning the wrong value back to the caller. When I run a test in my IDE I watch the values of...
Hi I'm working on this GPS project for microcontroller, I'm getting an error with the strstr function saying it is a type mismatch. I not sure if the error is because it is not fully ANSI compliant....
This is another part of that url-decode program, I apologize if I shouldn't have made a new thread, but it is an entirely different problem. Thanks to the wonderful folks that have helped me here I'm...
Thank you Laserlight, I didn't understand but that makes sense, going through each element of the array and comparing, instead of just trying to paste the code into another function, when I get home...
I got mad and I just couldn't leave it alone, I got it to work using this instead.
void URLEncode(char* destination,int length, char* source){
//local variables
int destc=0;
int i;...
I'm attempting to implement Laserlight's idea, but I can't get it to work. I really don't understand what I'm doing wrong here, I suppose I'm getting to frustrated to look at it line by line.
...
I gave it shot utilizing that method of trying to get the program to change a space into a +, but nothing is working.
I've tried to put this bit of code in several placed throughout the function...
I'm getting closer, I've decided to scrap my own ideas, and implement the ideas of the smarter people in the forum :) here is the new code but I still have 1 issue. The function URLEncode spits out...
I've taken the next step and removed the user's input from the encoding process. now I have a new problem. The encoder function encodes the text just fine, except it is appehending %0A which i think...
Thanks a bunch, figures it was something small like that!
I'm reworking my URL decoder, the first step is to seperate out the input, I made this function up to read input, but the phone number is coming out wierd, I think its printing the address. Can...
I got some feedback on my submission today.
The program is suppose to handle an input string
with multiple key/value pairs, like this:
...
I'm going to try that again Salem, I think an idea would be as you suggested, totally remove the input section from the encoding, then reintroduce it as a parameter into the code. Thank you.
I've gotten a lot further on the program but it's still not working properly, problems specifically
1. the data in urlencoding I can't get it to pass the value to urlDecoding, so I've had to make...
I've done some revision and I'm capable of fully reading a line now and assigning data to my structure, and printing it out fine.
My next problem now is I can't get it to URL encode now here is my...
I'm working on this program to take a person's name, address, and phone number and convert it URL coding print it, then unencode it then print it again normally, with labels over each part. I've run...
I'm wondering if anyone could explain how a couple statements in this code works.
int main()
{
char c, c1, c2;
printf("enter your sentence\n");
while( (c = getchar()) != EOF ){
if( c...
Hi all I'm trying to figure out how this function works, pointers give me a hard time still especially a function with several pointers as parameters.
I understand the function takes a string...
I've read quite a bit of information on CGI encoding, and how it works. A quick run-down from what I've learned.
A CGI is a program that automatically runs when a user goes to a website address,...