Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <string.h>
- #include <sys/wait.h>
- while (number < 100)
- {
- for (int row = 0; row < nrows; ++row)
- {
- for (int col = 0; col < ncols; ++col)
- {
- a[row*ncols+col] += 1;
- }
- }
- number += 1;
- }
- int main(int arg, char *argv[])
- {
- int fd[2];
- if (pipe(fd) < 0) { perror("pipe"); return 1; }
- int pid1 = fork();
- if (pid1 < 0) { perror("fork"); return 1; }
- else if (pid1 == 0)
- {
- dup2(fd[1], 1);
- close(fd[0]);
- close(fd[1]);
- }
- else
- {
- int pid2 = fork();
- if (pid2 < 0) { perror("fork"); return 1; }
- else if (pid2 == 0)
- {
- close(fd[1]);
- dup2(fd[0], 0);
- close(fd[0]);
- char *myargs[3];
- myargs[0] = strdup("wc");
- myargs[2] = NULL;
- execvp(myargs[0], myargs);
- }
- pin 7 goes to +12 v
- pin 4 g0es to -12 v
- pin 4 and 3 of the 741 and dac respectively go to -12 v
- get from power supply
- put into random row
- then connect to the same row as the one thats goiing to the power supply (dont put any other wire across the bridge)
- else
- {
- close(fd[0]);
- close(fd[1]);
- wait(0); wait(0);
- }
- }
- return 0;
- }
- click on select go to 25 v side, 25 volt is max, so sleect it and go to 5v, thjen
- one as 5 volt rail (6 volt max)
- one as ground (black and black)
- one as 25 (25 volt max)
- one as -25 (-25 volt max)
- 5 volt DOES NOT share the same line as the 12 volt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement