General :: Set The Gpio Pin Numbers For SCL And SDA?
Mar 2, 2011
On my board there is no i2c lines out. So I am trying to get i2c over GPIO by GPIO bit-banging. How to use i2c-gpio driver? Where to set the gpio pin numbers for SCL and SDA?
View 1 Replies
ADVERTISEMENT
Dec 4, 2010
I want to interface GPIO driven matrix keypad(4X4) to my linux box.
I saw a driver source file
linux-2.6.32.2/drivers/input/keyboard/matrix_keypad.c
How can I use this to achieve what I want?
View 3 Replies
View Related
Aug 3, 2011
i did compiled and installed kernel 3.0.0 on ubuntu 10.04 lucid lynx. well everything is fine except, a error message shown during the booting. Code: error: driver mdio-gpio already registered aborting how can i solve this error?
View 6 Replies
View Related
Feb 5, 2010
I need to control matrix 5x4 keypad, on a processor
i am doing by making one row low at a time, and keeping all other rows high,
by scaning coloums, the corresponding key value becomes low.
my problems is that it is taking much time to respond, like to make gpio
low to high and high to low...
View 1 Replies
View Related
Nov 4, 2010
I am using an imx27 and have a timer set up for 100 ms and a loop to count the pulses while the timer has not expired. I get about 90 % reliable results but every once in a while i get one that is out to lunch. I am reading in a signal that is about 500khz and counting on an transition. I usually get around 85k count. But i will randomly get a 50k count.
View 3 Replies
View Related
Apr 4, 2011
am writing a small search program for my class. I have decided to use indexing for my program. Ive researched online about indexing and how search engines do it. If im gonno do that I need to create inverted files to associate files to numbers ( numbers being the index of my paths ) . Now I was wondering what would be the best way to create an inverted file ? I was going to create sql tables using mysql api in C but then again there is no array data type or vectors to store few numbers in a single column in mysql and it is not advised to use Enum or SET
View 14 Replies
View Related
Aug 10, 2010
Can anyone specify the methods how to add decimal numbers in Linux
View 5 Replies
View Related
May 25, 2010
How to create random numbers between -5.0 to +5.0
View 12 Replies
View Related
May 10, 2010
I'm working with a rather large file of data taking from a tracking program on my phone, and trying to pull only the longitude and latitude from it. Any given line in the data looks more or less like this:
{"lon":-122.3083848,"time":1.273515839496E9,"source":"skyhook","nap":28,"altitude":0,"name":"location","hpe" :29,"bearing":0,"ncell":0,"lat":47.6544453}
I've run it through this command:
grep skyhook log-2010-05-10_18-17-28.json | cut -d"," -f1,10
to get this:
{"lon":-122.30872015,"lat":47.65812201}
{"lon":-122.3076686,"lat":47.6569975}
{"lon":-122.3079161,"lat":47.656395}
{"lon":-122.3096168,"lat":47.656218}
{"lon":-122.3096285,"lat":47.656206}
Which is a lot nicer, but I would prefer not to have to hand remove the non-number characters by hand since there are thousands of data points. what I could do to get it to just be longitude and latitude in 'number number' format?
View 8 Replies
View Related
Aug 1, 2011
Does any one know the process or commands to get the serial no: of a h/w device from a host?
I am looking for serial No: of Hdd,Graphic card,processor,RAM
I can get the serials of HDD & RAM using hdparm & dmidecode,but don't know how to get it for processor & Graphics card.
View 6 Replies
View Related
Mar 17, 2011
I want to use the Alt + numbers function in Ubuntu but I don't know how> I researched it first and i read I had to do Shift + Ctrl + numbers but ti doesn't work,
View 4 Replies
View Related
May 13, 2010
I want wondering if I can ls files that start with numbers only in a folder.
Suppose:
001.txt
302.txt
[code]....
View 6 Replies
View Related
Apr 20, 2011
Firstly I would like to say that Linux is very cool, especially the CLI. I have been trying to learn how to do some things in Fedora after being told Fedora was a good distro to get my feet wet. I have run into some issues and cant seem to find any answers. What Linux utility can be configured to automatically save the current logs?
How does your Fedora get an IP number? What IP numbers has your Fedora been assigned since it was installed (based on the logs you have)? What command did you run to determine the IP numbers? What command would you run to determine the number of times a user successfully used "su"? What command would you run to determine the number of times a user unsuccessfully used "su"? Having some issues with the file system as your Fedora boots up.
View 5 Replies
View Related
Jun 3, 2010
Any way to show the permissions with numbers (777) instead of with letters (drwxrwxrwx) using "ls" command or any other command ?
View 2 Replies
View Related
Mar 1, 2011
I am trying find files in a directory that contain numbers. I have tried ls /etc *[0-9]* but that doesn't work. If I cd to /etc and run ls *[0-9]* it almost works but it also includes results from within files. My last thought was to try: find /etc [0-9] -type f but this does not work either. My second problem is that I am trying to get list of files in a directory that were changed less than 10 hours ago, using grep, while leaving out directories. I am completely stuck with the second problem.
View 8 Replies
View Related
Nov 16, 2010
Our assignment is to take in two numbers and add them. While the inputs will always be numbers, we are to inform the user if they are doing it wrong. My code:
[Code]....
The code worked fine before I tried to idiot-proof it. I'll probably end up nesting the if statements checking if the first two inputs are not null, but I'm more annoyed at why the script isn't working.
View 3 Replies
View Related
Oct 6, 2009
In the file /var/log/kern.log, I see kernel logs in the following format,
Oct 6 11:18:30 machine kernel: [212.443755] Some logs...
What are the numbers in the bracket [212.443755] stands for?
View 2 Replies
View Related
Feb 27, 2010
I am a newbie in Linux. Here is my question....
Create the file ~/license_counts, which tables the number of occurrences of packages which are licensed under a given license, for the top 5 most commonly used licenses, sorted in numerically descending order. If performed correctly, your file should be formatted similarly to the following. (Do not be concerned if the actual counts or license names are different. Also, you might notice logically similar licenses, such as LGPL/GPL and GPL/LGPL. Do not make any attempt to combine them into a single entry.)
The resulted format:
I tried some method but cannot get it to work.
View 2 Replies
View Related
Jul 20, 2010
Is it possible for listing directory and files' permission into numbers?
Generally ls command shows directory and files' permission as follows;
[root:maestro:/home/ddisk_net]# ls -al
Total 44
drwx------ 4 ddisk_net users 4096 7월 20 10:40 .
drwxr-xr-x 21 root root 4096 7월 20 10:28 ..
-rw------- 1 ddisk_net webteam 5 7월 20 10:40 .bash_history
-rw-r--r-- 1 ddisk_net users 33 1월 22 2009 .bash_logout
[code].....
View 9 Replies
View Related
Apr 22, 2010
I am using RHEL 5. In my Linux Box I have two Lan cards (eth0 and eth1). "eth0" is connected with network 192.168.10.0 and "eth1" is connected with network 192.168.11.0. Both Network are inter connected via routing. Now I want a situation where, I want to dedicatedly assign some port numbers against a lan card. Like eth0 will be assigned for ssh (22) and eth1 is assigned for telnet (23). So that, when a user connect to 22 port then he/she is connected to the server through eth0 , and when a user connect 23 port then he/she is connected to the server through eth1. Is it possible to do using iptables or other?
View 2 Replies
View Related
Sep 6, 2010
Is there a command to return a recursive listing of sub-directories and the number of files in them? I have found plenty of ways to give me the total number of files in a directory structure, but none that gives a list of the sub-directories with the number of files in them. "du" gives me a listing of directories with their sizes, but I couldn't find an option (or any other way) to give me the number of files as well. Ideally, I'd like to get list with "Size" "Files" "Dir name" - And the order of the columns doesn't matter. Is there a "simple" command line solution or do I need a shell script for that?
View 5 Replies
View Related
May 19, 2010
To encrypt the text, we take the word "python" and make it at least the same size as "welcome home" by repeating it as follows:
w e l c o m e h o m e
p y t h o n p y t h o n
Then, we convert each letter into its numerical ASCII value as follows:
w e l c o m e h o m e = 119 101 108 099 111 109 101 032 104 111 109 101
[Code].....
And, finally, we convert the numbers back into their corresponding ASCII character:
View 11 Replies
View Related
Aug 21, 2010
I have huge files, wherein some lines begin with a number. I want to convert that number to a bookmark link
Sample file:
Code:
C.S. Lewis (I think) wrote:
1 If war is ever
2 legal, then peace
3 is sometimes
4 sinful.
Text without numbers toom I need the numbers to be <a name tags where the id is the letter x and the number that is at the beginning of the line:
Code:
C.S. Lewis (I think) wrote:
<a name="x1">1</a> If war is ever
<a name="x2">2</a> legal, then peace
<a name="x3">3</a> is sometimes
<a name="x4">4</a> sinful.
Text without numbers too I'm not sure why I can't get this, but after hours of 3 line long seds and endless while read lines, grepping ^[[:digits:]]s I can't figure it out.
View 3 Replies
View Related
Sep 28, 2009
as a result of a find command, i have
852065 72: /bin/gunzip
852065 72: /bin/gzip
852065 72: /bin/zcat
(the first column is inode number and the second is size if you're curious)
I want to be able to format it in a way such that:
852065 72:
/bin/gunzip
/bin/gzip
/bin/zcat
I know I can get the bottom half using awk- but I can't figure out how to extract the first set of numbers and get them to appear only once
View 9 Replies
View Related
Apr 11, 2010
I am trying to find a way to replace a set of sequential numbers in a file with a different sequence using sed. This might be done easier using awk or some sort of bash script, but it seems to me there must be a way to do this easily with sed. Basically, what I am editing is a Cisco switch config. I want to change the sequence of ports to a different numbered sequence. Here is an example of what I am trying to do.I want to change for example, the file:
Code:
cat testfile
interface FastEthernet0/1
[code]...
View 6 Replies
View Related
Jun 21, 2009
I have a text file with content that look like this..
Code:
1,3927,"AIS"
1,6928,"AIS"
[code]...
View 13 Replies
View Related
Dec 31, 2010
I am looking for a way to search for large numbers in text files and print the nearby lines.
For example if I had a text file like:
Event: 11
blah: 3
blah: 41 bleh: 19
Event: 2
blah: 31
[Code].....
View 1 Replies
View Related
May 22, 2011
I have a program that prints out lines like:
And I want to be able to pipe it to sort on that third column, by letter first, then number. But I keep coming getting files sorted like:
(field separations all start at same place, so columns are not jagged like above.)
I have read the sort man pages, and have tried -n for the numbers, and -k for the position to start sorting, among other things. I also tried inputting a second position to start sorting, which sort should supposedly refer to if the two entries are identical at the first place being compared, but it seems to just ignore the second one. I just can't get it to sort the numbers properly...
For now I am manually opening the file in emacs and changing them around, needless to say, very time consuming.
View 13 Replies
View Related
May 26, 2010
I'm writing a bash script where I read a text file (containing a column of numbers) and store each line in an array. There seem to be some problems with the whole thing however, but only for some files and not others. Here's what I do:
Code:
#!/bin/bash
file=time_notOk.txt ### The file with a column of numbers
i=0 ### Array counter
### Read the file
[Code]....
View 3 Replies
View Related
Nov 25, 2010
I just bought a new mouse - just a cheapie usb wheel mouse but it has an extra 'thumb' button which I thought I might as well set up to do something useful. I used 'xev' to determine the numbers that the OS had assigned to the buttons, and I found it wasn't quite what I was expecting:
left = 1
wheel-as-button = 2
right = 3
wheel-up = 4
wheel-down = 5
thumb = 8
I thought the right button would be '2' and the 'wheel-as-button' would be 3 - that's just how I've always seen them referred to in explanations, and I thought it was standardised. Not a big deal - the context menus still pop up when I click the right button so it all works ok. (And I just discovered the wheel-as-button does a 'paste' operation when it's clicked. Weird - I've never noticed that before...) But the thing that I find particularly odd: why is the thumb button assigned as '8'. What happened to '6' and '7'? Does the operating system assign these numbers, or are they built into the hardware in the mouse itself? Again, no big deal, I know I can remap the buttons if I need to, but I was just curious as to how this all works and google didn't help.
View 2 Replies
View Related