Search the Community
Showing results for tags 'variable'.
Found 2 results
How can you add or subract value from a variable???
hobron9 posted a topic in Energia - MSPCan anyone explain why the long variable 'frequency' will not change based on pin status? (loop function) I know I must be doing something wrong but I can't seem to figure it out. The program as written works. I type in for example 7000000 and the DDS programs to 7.0 Mhz. If a pin is pulled low I want to add or subtract 1500. But that part does not work. It always sets the DDS to the input frequency. I've added print statements to verify what is happening and I know the program is detecting pin state OK. so something is wrong with my logic for adding or subtracting. file attache
Variable Frequency Output
kartikharia posted a topic in GeneralHow to change the output frequency of the analogWrite() function in Energia??