C Programming Answered

Hey, I would like to start learning C (yes, I want to learn C, not C++, because so then I will be able to prgram the Arduino), so I wondered if any of you guys know a good tutorial or a good book on how to learn C. Sorry my english is not good, I do not live in an english speaking country. SKC

Question by Balls of Kevlar   |  last reply

C programming

Hey, I would like to start learning C (yes, I want to learn C, not C++, because so then I will be able to prgram the Arduino), so I wondered if any of you guys know a good tutorial or a good book on how to learn C. Sorry my english is not good, I do not live in an english speaking country. SKC

Question by Balls of Kevlar   |  last reply

c compilier

Where can i get a free c compilier because ive been using djggp and its has a limited source bytes i want unlimited source bytes

Topic by cris1133   |  last reply

C++ help

Hello programers i need ur help, i need c++ program that control dc motor by 2 inputs U for Up and D for Down , so once  press U cycle duty increases by 25%  until reach max and press D for decreasing 25% until stop i hope  getting replays soon thanks all

Topic by nerofromeuro   |  last reply

C Help

I'm working on an electronic project for school, and I've been trying to learn C, I have a quick question, I think the answer is a function, but I don't know and I need an example. Basically I want something where I can break up the code into sections (I'm pretty sure it's called a function) and bring them all back together in the main() for example, lets say I want to have a function to turn on an led, then I have a different function to wait for so long, and then another function to turn it off, except I can control what LED I want to turn on/off and for how long (I want to be able to input to the function) Once again, I'm pretty sure it's called a function, I just don't know how to use them.

Topic by guyfrom7up   |  last reply

C++ programming...?

Hi all. i know a bit of c++. And I want to make a simple program that calculates Pi. Now, I want it to have the user input the number of decimal point thingies... and let it do the rest. BUT, it must be stoppable no matter how HUGE a number the put in... and im 12, so please try to make it as easy as possible. THANKS!

Question by sci4me   |  last reply

C++ audio

Where can I learn about how to program audio in C++? I already know many of the the basics of C++, but I really want to get into audio programming.

Topic by 8bit 

C++ Keylogger

Im posting this forum to find out what you people think about posting a instructable about a kelogger..... any ideas?

Topic by B.F.L.M   |  last reply

whats the difference between C++ and C#?

Thats C plus plus and C sharp. my computer science teacher asked us and im just curious

Question by 2fst4u   |  last reply

how to generate a signal (pulse) with c# using usb port

For my application , I need to generate a signal wich contains 2 pulses , 1 of 150 ms and the other of 427 ms , seperated with a duration of X ms , using the usb port of my computer and c#

Question by isalhi   |  last reply

hi i'm new, i wana code arduino led interface in C#?anyone hlp plzzz?

I want to code ov arduino in C#, i dn have idea about C#!! i need help urgntly :(

Question by s_mehak   |  last reply

Atmel ICE basic?

Hey I got Atmel ICE basic, 6 pin wire and atmega1248. I try to sent  program code, but there comes error message. How I should connect  pins? http://www.atmel.com/Images/Atmel-42330-Atmel-ICE_UserGuide.pdf http://www.atmel.com/images/Atmel-8272-8-bit-AVR-microcontroller-ATmega164A_PA-324A_PA-644A_PA-1284_P_datasheet.pdf

Question by mattilaniko   |  last reply

C# button on a form Answered

I'm trying to make a form i have the form and the about box made i just need to assign the about box to the about button on the form does anybody know how to do that

Question by hightekrednek2396   |  last reply

c++ code hElp?

This is the code for mobile operated robot found from this site can somebody explain this code i didnt understand  the line which is Italic and Bold like this (DDRD=0xff;  DDRB=0×00) somebody plz tell me what the lines are CODE /* DTMF Controlled Robot PORTD pin 0,1,2,3 goes to motor driver l293d PORTB pin 0,1,2,3 is connected to output of CM8870 DTMF decoder IC */ #include #include int main(void) { DDRD=0xff; DDRB=0×00; while(1) { switch(PINB&0b00001111) { case 0b0010://Key 2 { PORTD=0x0A ;      //1010 both motor front continue; } case 0b0100://Key 4 { PORTD=0×02;    //0010 right motor front continue; } case 0b0101://Key 5 { PORTD=0x0F;//1111 SUDDEN STOP continue; } case 0b0110://Key 6 { PORTD=0×08;  //1000 left motor front continue; } case 0b1000://Key 8 { PORTD=0×05; continue; } default: continue; } }//end of switch return 0; } // // // //

Question by agent555 

C voice lessons?

Hiya! I just got a new Sansa fuze for Xmas (8 gigs, Installed Rockbox, IT ROCKS!!!) and I wana start learning C. I actually already started, But I best process info when I hear it. Where can I find simple English (Russian or Hebrew also welcome) lessons of the C programming language? I have learned the basics of both C# and VB 5.0, So it don't have to be THAT easy... any help?

Question by netbus 

r/c commuication with the arduino mega

I was wondering if anybody knows what pins have to be used on the arduino mega to get the r/c signal converted so that i can drive a store bought motor driver. I am lost  on the wire connections. Thanks for the help

Topic by mfm5024   |  last reply

How Do I begin to program in c without a microcontroller

How would i get started writing programs in C/C++ on the computer for free. I would like to be able to write simple games.

Topic by sotsirh194   |  last reply

HELP IDEAS for Mini A/C Unit for Truck

This is an idea that has been tried before with other type equipment & applications. However I think that I have found a way to limit the cost & over size of the application for the use intended. The rubb is that I need help with the fabrication. So I am hoping that the brain power will rally to help in a proto-type or test model of this idea.THE IDEA: A mini A/C unit to keep a vehicle cool for short periods of time 1-2 hours.Why needed?? I own a Private Investigation Agency and have very expensive electronic equipment inside sensitive to the high heat in south Texas during the summer.Equipment on hand for the idea:A. Small Cooler & HEater unit that can be found @ most Walmart, Walgreens, ect... Size 12"x 10" x 6"Input: 100-240VAC 1.2 A 40 watt Output 12 volt 4.0 A (looks like a tall showbox with a single hinge that opens like a center console-armrest-glovebox in a truck or van. Picture below...B. A DC/AC convertor also sold at same stores. The unit is very small but will power the unit very easy. 12 volt 5 A 100 watt, 4" x 3" x 3/4"C. a zeus sealed 12 volt battery 4-5 AH with the PWR use of cooler.D. VArious size small electric fans to be used a blower fans.E. PVC or duct work for the application.F. Optional Solar Cell for battery recharge to be mounted on roof of vehicle.I am sorry if my post is inapropiate for this forum or if I have used this post wrong for my purpose. This is my first time to post anything...If there is anything I can do to help with the concept please let me know.I will try and add Pic's of the parts later.THANKS!!!PS: total cost of everything brand new was less than $50.00

Topic by leebarret   |  last reply

microcontroller 8051 seriel interfacing with pc

I want coding of microcontroller seriel interfacing to pc in assemble and c both

Question by f_siddiqui   |  last reply

I need some help please ^^

Hello everyone. i have one project to control the rotation 3 phase motor with visual C. But i don't know how to do that. anyone who know tell me how to do that please :)

Topic by pfromthailand   |  last reply

arrays base address is 1000?.array is a[5][4]..then wat is the correct address of a[4][3]? ?

It's a question on C programming.  Please explain the answer.

Question by sanlee1990   |  last reply

How can I keep my dog cool in a car in the summer? Answered

Opening windows in 90 degree heat isn't enough.  Is there a portable window a/c, or equivalent, available?

Question by cgmox3410   |  last reply

Why won't this compile? Answered

I am going by a book to teach me C programming, and I have entered the program exactly, but my compiler says there's an error.  I know it is not an issue with the compiler/IDE because I tested it in another compiler and had the same result. Here is the code: #include #include int main (void) {     char buffer[256];     printf("Enter your name and press :\n");     fgets( buffer );     printf("\nYour name has %d characters and spaces!", strlen(buffer));     return 0; } It says on line 8 (the one with fgets) that there are too few arguments, yet the book says it should compile correctly.  The book is Sams Teach Yourself C Programming, and it is in lesson 2 exercise 5. Thank you for any help!

Question by StarscreamClone   |  last reply

is it possible to make a rc fan out of a rc car? and if so how? Answered

 i have a ton of rc cars but most either don't work or body,wheels, or something else doesn't work so i wanted to make a rc fan out of them.

Question by nbagf   |  last reply

Object-oriented programming in Unity?

Hi people, My name is Cynthia and I need some help with Object-oriented programming. I have a project for school where I'am making a 2D platformer game with Unity. Where I have to make a base class and two child classes that inherits from it. I have to work with constructors, properties, etc . The problem is I kinda know what the constructors, properties etc do but I don't know how to put them together to make a game. Can someone help me, push me into the right direction cause now I don't know where to begin with. What I like to make is a Enemy base class with two sub classes (enemy 1 and enemy 2) or base class Item (sort of coins or power ups) with two sub classes (item 1 and item 2). If there is someone who can help I would be so grateful. (I program in C# and the game must be made in Unity). Sorry if this is not the right place for asking such a thing. Thanks Cynni

Question by Cynni   |  last reply

Is there a simple way to test the air flow/pressure inside my HVAC fan housing?

Is there a simple way to test the air flow/pressure inside my HVAC fan housing? Perhaps some kinda guage I can attach to the blower unit of my fan box for the HVAC? Why? I'd like to test with new filter and then old, to determine when it needs changing. so, I'm looking for a simple, cheep differential pressure gauge or some means to tell if the filter is dirty and thus constricting the flow through the fan unit.

Question by gereckes   |  last reply

How to reset arduino after pressing the pushbutton 16 times?

Good afternoon, I'm trying to reset my Arduino after pressing the pushbutton 16 times. What I'm currently experiencing is that it is not resetting. I'm trying to achieve this using the StateChangeDetection example. Could anyone give me tips on how to achieve this? I'm working on this using an Multi Function Shield or MFS. My code is: // this constant won't change: const int  buttonPin = A1;    // the pin that the pushbutton is attached to const int ledPin = 13;       // the pin that the LED is attached to // Variables will change: int buttonPushCounter = 0;   // counter for the number of button presses int buttonState = 0;         // current state of the button int lastButtonState = 0;     // previous state of the button int count = 0; void setup() {   // initialize the button pin as a input:   pinMode(buttonPin, INPUT);   // initialize the LED as an output:   pinMode(ledPin, OUTPUT);   // initialize serial communication:   Serial.begin(9600); } void loop() {   // read the pushbutton input pin:   buttonState = !digitalRead(buttonPin);   // compare the buttonState to its previous state   if (buttonState != lastButtonState) {     // if the state has changed, increment the counter     if (buttonState == LOW) {       // if the current state is HIGH then the button went from off to on:       buttonPushCounter++;       Serial.println("on");       Serial.print("number of button pushes: ");       Serial.println(buttonPushCounter);     } else {       // if the current state is LOW then the button went from on to off:       Serial.println("off");     }     // Delay a little bit to avoid bouncing     delay(50);   }   // save the current state as the last state, for next time through the loop   lastButtonState = buttonState;   // read the state of the pushbutton value:   buttonState = digitalRead(buttonPin); //Source: https://www.instructables.com/answers/Is-there-a-way-to-count-button-pushes-on-an-arduin/ if (buttonState == HIGH) {        // turn LED on:       digitalWrite(ledPin, HIGH);     count++;               // add 1 to the count     if (count >= 8) {       count = 0;     }   }   else {     // turn LED off:     digitalWrite(ledPin, LOW);   } }

Question by DanielB804   |  last reply

Arduino coding problem

I'm creating a PIR Sensor Alarm with Arduino. I'm using Arduino Uno, PIR Sensor, Breadboard, LED, Buzzer, TTL JPEG Camera, Arduino shield and SD Card. I already have the code to make my project work, but I still can't figure out the right code for the Camera.. so I need some help with that..   here's my code: int ledPin = 13;                // choose the pin for the LED int inputPin = 2;               // choose the input pin (for PIR sensor) int pirState = LOW;             // we start, assuming no motion detected int val = 0;                    // variable for reading the pin status int pinSpeaker = 10;           //Set up a speaker on a PWM pin (digital 9, 10, or 11) void setup() {   pinMode(ledPin, OUTPUT);      // declare LED as output   pinMode(inputPin, INPUT);     // declare sensor as input   pinMode(pinSpeaker, OUTPUT);   Serial.begin(9600); } void loop(){   val = digitalRead(inputPin);  // read input value   if (val == HIGH) {            // check if the input is HIGH     digitalWrite(ledPin, HIGH);  // turn LED ON     playTone(300, 160);     delay(150);         if (pirState == LOW) {       // we have just turned on       Serial.println("Motion detected!");       // We only want to print on the output change, not state       pirState = HIGH;     }   } else {       digitalWrite(ledPin, LOW); // turn LED OFF       playTone(0, 0);       delay(300);          if (pirState == HIGH){       // we have just turned of       Serial.println("Motion ended!");       // We only want to print on the output change, not state       pirState = LOW;     }   } } // duration in mSecs, frequency in hertz void playTone(long duration, int freq) {     duration *= 1000;     int period = (1.0 / freq) * 1000000;     long elapsed_time = 0;     while (elapsed_time < duration) {         digitalWrite(pinSpeaker,HIGH);         delayMicroseconds(period / 2);         digitalWrite(pinSpeaker, LOW);         delayMicroseconds(period / 2);         elapsed_time += (period);     } } Thanks

Topic by fhussein1   |  last reply

Is There Any C++ Client For Mac? Answered

Aside from dashcode, is there any c++ client similar to visual c++ studio 2008 express for mac osx

Question by robots199   |  last reply

What is the best book for learning Python and C++?

I want to learn python and C++ but I want a couple of good books to learn those with. What books do I need if I want to start?

Question by nerd7473   |  last reply

free example Assembler and C programs. Examples

Ftp://fets.user32.com username: ian password: blank, no password required.

Topic by turnbui 

free computer programs written in C and Assembler

I have a number of free example programs including socket and web page programming. Help yourself by going to ftp://fets.user32.com and use   ian   as the username. There is no password required so leave it blank. I hope you find something useful. ian t.

Topic by turnbui 

How do you have a C# program look for a file in a directory and if it isnt there generate it? Answered

I would like it to check for a text file named Username.txt in the same drive (ex C:/) as the program, and if it isnt there, generate it? Where in the source would the code go?

Question by drmjj55   |  last reply

Visual Studio plugin

Hello, I would like to install this realtime c++ on visual studio 2008, but I do not know how to. Thanks for any help

Question by jbaker22 

D.C input resistance of a BJT transistor in C.E configuration?

What will be resistance across base and emitter of BJT in C.E configuration

Question by deepakmurali   |  last reply

How do you use makefiles with avrdude?

I am new to avr and want to know if you can use avrdude with makefiles?

Question by sotsirh194   |  last reply

how do you build a 7 cell hump battery pack for a rc car?

I want to build a 7 cell hump battery pack for a rc car does anyone have step by step instruction with pictures

Question by kenwill211 

Is it possible to take a comupter moniter, and hook up my gamecube to the moniter so i can play it?

I really want to hook a gamecube up to my p.c. moniter and be able to play it. please involeve no soddering, or expensive items. PLEASE HELP ME!

Topic by homeboy   |  last reply

How do I make arduino Add 5 numbers and spit out the average?

This is what I have so far. but its not working..  float average = 0; int total = 0; int n; void setup(){   Serial.begin(9600);   while (Serial.available());   for (n=0; n <=5; n++);   total+=Serial.parseInt();   average=total/5;   Serial.println(average);   } void loop () { }

Question by jadjei   |  last reply

Possible bug in avr-gcc, any second opinions? Answered

I'm fairly sure that the following is a bug in AVR-GCC, but I'm not sure. Basically sizeof should tell you the size in memory of something in memory. So you can do sizeof(char) or sizeof(myArray) and it will tell you how many bytes are taken up. If I do sizeof(myArray) where myArray is a local array of chars the answer is correct. If I pass the value as a parameter then the result of sizeof(myArray) is always 1. Does anyone have any idea's or explainaitions? This code is being put on an Attiny2313. Thanks in advance,

Question by andy   |  last reply

Is it possible to adapt a domestic Aircon unit to feed five dog kennels,

I have been asked to supply cool air to five kennels, adobe built, in a row.  I am proposing to Build a funnel box around the inside unit to feed air through pipping (drainage/plumbing) to the individual units.The engineer/salesman has told me it is immpossible to do this and a much larger/expensive system will be required.  Would any one care to comment on this ? I was planning to fit a small fan at the far end of the tubing to aid in the flow of air and take back pressure off the unit.  As with most of the instructables I have seen here, I know this is not the "correct" way of doing the job, more of a hack but at the moment I have more time than money

Question by wagman   |  last reply

Microcontroller inputs in C language?

I'm having problems finding and figuring how to do inputs with mirocontrollers VIA button press >> led goes on.(I have a ATTINY2313)Outputs are as simple as PORTB = 0x10 (being hex for pin 16). Keep in mind I'm very new to micros and C. The most I've done was fast-slow blink patterns. How can i do inputs though? SIMPLE code sample is welcomed!

Topic by Killa-X   |  last reply

AVRDUDE C programming and random - help

I've tryed a few code samples but none are working. I use AVR dude and i've been doing #include but i cant get rand() with RAND_MAX to work, cuz i just get a expression error. code sample please!

Topic by Killa-X   |  last reply

Is it possible to map data to values in C (for AVR)? Answered

I am trying to make a USB 8x8 pixel LED screen that will display single characters received over serial emulation. I have a proof of concept device but due to my lack of knowledge of C I'm struggling slightly with a specific aspect of the code. To display a character I need to take the 'source' char (such as 0x41) and look it up in the flash memory of the AVR, returning an array of chars (which will be used to render the character). It would be desirable for that information to reside in its own file (a Header perhaps?) - because this would enable multiple interchangeable fonts. This is certainly possible in PIC micro-controller (I made a program utilising data blocks in Assembler a while ago for PIC) and I can't imagine that it's difficult on an Assembler level for AVR either, but I am unsure what I am looking for in the C language. Any help would be appreciated, Thanks, Drew P.S. I'm a Java programmer but new to C and AVR.

Question by andy   |  last reply

Shuld I take lessons on C or Embedded C to programme arduino ?

Hi folks, I want to learn arduino programming..but I don't have any programming experiences.I'm thinking about taking some C language lessons.will C help me to programme arduino?  and I also heard that there is another language called Embedded C.I'm confused which C language should I learn to programme arduinos?

Question by mzee233   |  last reply

Can I &quot;upgrade&quot; my Nikko Electric R/C Hummer H2 with a couple of 9 volt batteries without blowing anything?

I have seen a Mod of an Airsoft pistol from Wal-mart that pretty much applied three 9 volt batteries, and it was able to shoot farther and faster and I was wondering if it can be applied to a Nikko Electric R/C Truck the same way. It currently runs on a 9.6 Volt Battery. And I would like to see if there are any precautions or additions I should look into before applying a few 9 volt batteries. Just so I don't blow any circuit boards or anything else. Because like many Americans... we just want everything to go faster. Thank you

Question by    |  last reply

Real-time Ocr and SMS Notification?

How can I develope a program as I explain below? I don't know where to start. By the way, I know C language. Is there any helpful resource about this subject? Thanks. For example, there is a live number generator between 1-15 as image. This images changes every 10 seconds. Program should catch the image everytime as digit number. By the way, there is 3 integer variable as a,b and c: If the number between 1-5, then variables b and c should increment by 1 and 'a' should be equal to 0. If the number between 6-10, then variables a and c should increment by 1 and b should be equal to 0. If the number between 11-15, then variables a and b should increment by 1 and c should be equal to 0. If a,b or c is equal to 13, then program should send an SMS to phone as for example 'a is 13.

Question by kaann45   |  last reply

how do you compile code in avrdude? Answered

I do not understand how to compile c code in avrdude?

Question by sotsirh194   |  last reply