Posts

Showing posts from April 6, 2019

How can I replace “cat” and “echo” read/write command with python/c program?

Image
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box; } 0 I have trouble replacing device in/output commands like: echo 100 > /dev/rtmotor_raw_l0 # output 100hz frequency cat /dev/rtswitch0 # read switch state output problem(python) I tried replacing that command with python. file = open('/dev/rtmotor_raw_l0','w') file.write('100n') # I want output in this timing file.close() # output reflected after closing file The problem is that the output appears after closing the file. Does this mean I have to open and close this device each time I want to change its value? Also, changing 'w' to 'a' did no

How to find graph of the sum of two functions

Image
0 $begingroup$ Suppose I know the graphs of two functions $f(x)$ and $g(x)$. How can I find the graph of $h(x)=f(x)+g(x)$? What are the rules to be followed ? P.S. In case my question seems silly,at least provide me with a link or something so that I can learn! functions graphing-functions share | cite | improve this question edited Jul 28 '15 at 16:25 Hoping_Blessing 268 2 12 asked Jul 28 '15 at 16:13 user220382