Beaglebone: An I2C Tutorial - Interfacing to a BMA180 Accelerometer

  Рет қаралды 103,834

Derek Molloy

Derek Molloy

Күн бұрын

Пікірлер: 60
@boydsoftprez
@boydsoftprez 12 жыл бұрын
Thank you for your beaglebone videos! They are the best I have found on the net.
@afterthought138
@afterthought138 12 жыл бұрын
These videos are amazing. I've learned so much about the beaglebone, embedded linux, and linux in general from them. I hope that you can make more because they are a resource i keep coming back to!
@lifeonagriculture3330
@lifeonagriculture3330 5 жыл бұрын
This video provides information from hardware, spec , register and programming of register and lot more. Thank you for valuable video
@mik3anthon3y
@mik3anthon3y 12 жыл бұрын
Fantastic lesson! I've been looking for videos with similar content for the Raspberry pi. I hadn't found anything worth mentioning, unitl now. Thank you!!!
@teuluPaul
@teuluPaul 12 жыл бұрын
No worries - thanks for letting me know. I found the KPlotWidget which will do the same job. I will now spend my day understanding (1) how to open a socket on the Beaglebone and expose the sensor data, (2) accessing the data on the host PC, and (3) displaying it in a simple Qt application. Fun! If I succeed, I will post the code on github in case anyone else is interested.
@roxa8651
@roxa8651 12 жыл бұрын
This is really good! I have been waiting for this video and I am pleased! I wish the next video is about real time execution. I have tried pthread in angstrom and it is running well, but I havn't got the scheduling to work yet.
@alski259
@alski259 7 жыл бұрын
This wasn't trivial. To articulate the concepts while talking, typing, recording. Well done. Just got your book.
@MichaelHyde
@MichaelHyde 10 жыл бұрын
Thank you for creating a fantastic video very thorough very professional please keep up the good work!
@DerekMolloyatDCU
@DerekMolloyatDCU 11 жыл бұрын
Hi Bessem, I'll try to dig out the source code for my website. I had trouble finding it just now. The code on the client side contains some code that I do not have permission to redistribute. The code on the beaglebone was regular C++ socket code and the code on the server side (PC) was the standard QT socket example. The intercommunication worked straight off (if I remember correctly - there may have been one late night!)
@CheyenneMeyer
@CheyenneMeyer 9 жыл бұрын
FYI, In some fields I do believe it is standard practice to utilize the full resolution of the destination variable when pushing your ADC values into place. This allows you to replace the ADC with one of a different resolution without needing additional programming changes (assuming the interface has not changed). Thus a 14-bit ADC and a 12-bit ADC would both utilize the same scale. Uusing a ushort, for example, would provide a universal scale of 0 to 65535 regardless of ADC resolution. This is very common in industrial applications.
@daevyd100
@daevyd100 8 жыл бұрын
Thank you for this series Derek
@DerekMolloyatDCU
@DerekMolloyatDCU 11 жыл бұрын
I am currently working on a tutorial on SPI and on OpenCV - I have been slowed down dramatically by the changes to the Linux kernel in 3.8.3 that has made configuring the I/O pins difficult. Hopefully I will work it out soon and the tutorial will follow!
@DerekMolloyatDCU
@DerekMolloyatDCU 12 жыл бұрын
I have had a very busy lecturing load in the past 4 months. Normal service will resume soon! Derek.
@DerekMolloyatDCU
@DerekMolloyatDCU 12 жыл бұрын
When you mount the SD card under Linux it should come up as two drives: Boot /media/boot, And rootfs. I have enabled i2c-2, by adding "i2c_bus=2,400" to boot arguments in uEnv.txt (under Boot). Now, I made this change after rebuilding the Kernel (in my next Beaglebone video) so I may have made some changes to the kernel configuration. Good luck!
@undercrackers56
@undercrackers56 11 жыл бұрын
Sir, I salute your knowledge, your willingness to share this knowledge and the skill with which you make it available. Although I don't work with Embedded Linux (I work with Microchip C and MPASM) I seem to have become somewhat addicted to your videos. Is there any chance of a tutorial on how you put your tutorials together?
@michaelpowell1308
@michaelpowell1308 9 жыл бұрын
this seems like an easier (?) way to interface through sysfs than directly through any I2C calls, worrying about whether SMBUS protocol is implemented, or what have you. definitely work some time to get better acquainted with this way or working with I2C.
@michaelpowell1308
@michaelpowell1308 9 жыл бұрын
when I worked with I2C, I did similar driver/application level class abstractions. good stuff. also using C++1y standards, strongly typed enums, using hex-enum values, to make it easier to translate to/from device docs, etc. driver classes being close to the metal, application classes being abstractions for the application level, where it makes sense, may combine multiple driver classes into various sessions, etc. well, closer to the metal, if you talk to pure C-guys, but with C++ any more, it's about as close as you can get to the metal. std::bitset is wonderful for this! :)
@subhajitghosh8
@subhajitghosh8 10 жыл бұрын
It is really good. Thank you very much for sharing your knowledge. I am planning to make a kernel driver for the same device.
@yasiral-hilali7855
@yasiral-hilali7855 6 жыл бұрын
How did it go? Was there any issues? I am struggling with making one on new version of Debian
@sskimbox
@sskimbox 12 жыл бұрын
Amazingly well-made and informative video. Like other people, I also want to suggest other topics, including UART control (BTW, is it possible to simultaneously control 4 UART?).
@Baloon_edits
@Baloon_edits 10 жыл бұрын
Derek ..nice tutorial..pls relase ur video for SPI communication like this...
@ramonsa1688
@ramonsa1688 11 жыл бұрын
Hi , Derek - Could you please post a tutorial how to use SPI on beaglebone?
@DerekMolloyatDCU
@DerekMolloyatDCU 12 жыл бұрын
Hi Paul, unfortunately I am using a QT graphing library in that code that I do not have permission to redistribute. If I get some time I will try to build a sockets example that does not do any graphing and I will be able to distribute it.
@immanuvelleenus
@immanuvelleenus 11 жыл бұрын
Hi derek Thanks for this video it will be very useful to me
@tusharpaithankar
@tusharpaithankar 9 жыл бұрын
thank you for such a detail information, loved it.
@bessembaccouche4771
@bessembaccouche4771 11 жыл бұрын
Hi Derek, Could you please post the code you used to transfer the data from the sensor over the network . Thanks
@brentsimpson3791
@brentsimpson3791 11 жыл бұрын
Awesome video! I'm new at this, where could I download the Source Code you mentioned? I'm keen to have a play with it...
@l0calm0ti0n
@l0calm0ti0n 11 жыл бұрын
Hi Derek, I didn't see the I2C code attached anywhere for this video. Perhaps you can point me to the correct location? Thank you!
@tcbetka
@tcbetka 11 жыл бұрын
Hi Derek, I was wondering if you could/would share the name of the Qt charting widget you used? I take it that it's not in the base Qt package, and may possibly be a 3rd-party control? I've been looking for something just like this, and there is one out there I've found--but I was hoping you could share the name of this one, and maybe where a person can learn more about it. Thanks!
@angelosantos4706
@angelosantos4706 12 жыл бұрын
Great video! Although I was wondering if there was a difference with embedded linux and uclinux? If so, is there a similar method I can use with uclinux? And is there a way that I can get a copy of the codes of the bma180 that is uclinux compatible?
@katogangstad
@katogangstad 11 жыл бұрын
I also would like to get my hands on the complete code. Could you please post it ?
@shiweiluan
@shiweiluan 11 жыл бұрын
Hi Derek, can you give me some instructions on how to use Java codes to monitor I2C port on BeagleBone? I want to attach several I2C devices to Beglebone, if any device sends information to Beaglebone, the codes on Beaglebone can read the information. I think I can use Multi threads by Java, but don't know how to do it exactly, or if it's possible to use multi threaids to monitor I2c. Thank you.
@MrLolztome1
@MrLolztome1 12 жыл бұрын
@DerekMolloyDCU EPic Videos man but hey can u make videos on OPENCV in BB and maybe some fun C++ code?
@lifeonagriculture3330
@lifeonagriculture3330 5 жыл бұрын
Hi Derek, It would be very helpful if you prepare interview on I2C linux device driver. Please prepare. .ko on i2c. Thank you very much in advance.
@teuluPaul
@teuluPaul 12 жыл бұрын
Hi Derek - Could you please post the code for your qt program running on the host pc? Thanks! Paul
@bBrain
@bBrain 10 жыл бұрын
Could you do a video for the simplest way to connect a sparkfun's LSM9DS0 9dof to beaglebone black? I can't figure it out...
@freedepee
@freedepee 10 жыл бұрын
have you figured it out yet?
@bBrain
@bBrain 10 жыл бұрын
fttl not on bbb. On arduino yes.
@CountDownToDisaster
@CountDownToDisaster 10 жыл бұрын
GodFear17 If you have figured it out, please let me know. I'm having the same problem.
@bBrain
@bBrain 10 жыл бұрын
***** I never got the LSM9DS0 to work on the BBB, but I did get it working easily with the arduino, I'm just using a mega and works fine.
@AlexFuhr1
@AlexFuhr1 9 жыл бұрын
GodFear17 If you're still looking, I managed to get a library made based on the Sparkfun library: github.com/projectzen/Beaglebone-LSM9DS0
@RixtronixLAB
@RixtronixLAB 4 жыл бұрын
Cool info, thanks :)
@superxingzheng
@superxingzheng 11 жыл бұрын
Hi Derek, could please tell me some helpful tutorial or reference material for serial port programming in C/C++ under ubuntu for beaglebone?
@katcam7993
@katcam7993 4 жыл бұрын
I am trying to use the Ivensense iCP 10110 pressure sensor with a pocketbeagle. When i try to i2cdump to it I get many X (read errors ) and 1 value 01 (when it actually write back). Whenever I try to write or read from I get errno 121 remote i o error and then it dissapears from from the i2cdetect plot. I power cycle each time and start again. Has anyone encountered something like this ? If, so were you able to make it work?
@liqiangdu3062
@liqiangdu3062 11 жыл бұрын
Hello Derek, first thank you very much for you work, it really help us beginners a lot.And I have a problem here, I did everything just like what you said,and I also got the device address,but after that when I use the "i2cdump" command, almost all the values are 0,do you have any idea why that is happening?I'm using MPU6050,it's a 3 axis accel and gyro, so the data all be 0 just don't make any sense.And my BBB system is Linux arm 3.8.13(debian).Thank you for your help
@anticlementous
@anticlementous 9 жыл бұрын
liqiang Du You have to write a 0 to turn off the sleep bit. I believe you need to write to 6b. Try i2cset 3 0x68 0x6b 0.
@cyrillehasdenteufel2158
@cyrillehasdenteufel2158 12 жыл бұрын
Thank you so much it's very helpful... On my beaglebone just omap_i2c.1 is available. What can I do for omap.i2c.2 or 3 ? do u have an idea ? Thanks in advance
@hamdihosni1942
@hamdihosni1942 11 жыл бұрын
Is it possible to configure BBB port as slave ??
@keybisenriqueramosbecerra5639
@keybisenriqueramosbecerra5639 8 жыл бұрын
can you do in c++? blacklib library
@Csangomorfozis
@Csangomorfozis 9 жыл бұрын
Hello everyone! :) I tried to connect an MS5803-14BA pressure sensor to my Beaglebone Black, and when i test i2c-1 (pins P9_19 and P9_20), the sensor's address doesn't appear on the memory map. My hookup is the following MS5803-14BA Beaglebone_Black GND -> P9_1 3.3V -> P9_3 SDA -> P9_20 SCL -> P9_19 I am using the latest Debian image on the BBB with the kernel version 3.8.13 My question is: Did i something wrong on the hookup or on the Beaglebone do i need to configure something to make the i2c probing correctly? Theoretically if i connected the sensor properly, then i should see its address on the Beaglebone. Can give me somebody an advice? Thanks :)
@deepapadmanabhan7573
@deepapadmanabhan7573 9 жыл бұрын
Csangomorfozis You need to enable the 3rd set of i2c pins. echo BB-I2C1 > /sys/devices/bone_capemgr.*/slots
@deepapadmanabhan7573
@deepapadmanabhan7573 9 жыл бұрын
deepa padmanabhan Initially, I couldn't get the BBB to recognise my DMA280 accelerometer. I had to use pull up resistors and enable to pin-select. What I mean to say is just connecting may not be sufficient. There might be MS5803-14BA specific inputs you might have to give.
@书不释手
@书不释手 7 жыл бұрын
how I get the source code?
@teuluPaul
@teuluPaul 12 жыл бұрын
Mentioned at 10:17. Have a look at: elinux.org/Interfacing_with_I2C_Devices#Beagleboard_I2C2_Enable That gives you some pointers
@shebotnov
@shebotnov 12 жыл бұрын
no new videos for 5 month :(
@ThaFacka
@ThaFacka 12 жыл бұрын
I'm glad I abo'ed you!
@c2h2c2h210
@c2h2c2h210 12 жыл бұрын
please use github to post code not a zip, not linux style
Beaglebone: Adding USB Wi-Fi & Building a Linux Kernel
56:44
Derek Molloy
Рет қаралды 84 М.
Какой я клей? | CLEX #shorts
0:59
CLEX
Рет қаралды 1,9 МЛН
"Идеальное" преступление
0:39
Кик Брейнс
Рет қаралды 1,4 МЛН
Writing Code That Runs FAST on a GPU
15:32
Low Level
Рет қаралды 573 М.
A simple BIOS for my breadboard computer
21:53
Ben Eater
Рет қаралды 362 М.
Beaglebone: Qt Creator for C++ ARM Embedded Linux Development
44:19
Derek Molloy
Рет қаралды 140 М.
How to use GPIO pins on the Beaglebone Black
12:21
MP Projects
Рет қаралды 41 М.
Hacking a weird TV censoring device
20:59
Ben Eater
Рет қаралды 3,3 МЛН
Beaglebone: GPIO Programming on ARM Embedded Linux
46:06
Derek Molloy
Рет қаралды 107 М.
Extracting Firmware from Embedded Devices (SPI NOR Flash) ⚡
18:41
Flashback Team
Рет қаралды 596 М.
I tried the Cheapest Arduino Alternative (that Nobody heard of)
13:31