[beagleboard] Append to a text file using Bonescript
Not sure if there is a better way, but you could do a readTextFile, store the data in a string, append your data to the string, then writeTextFile the data to a file. This would work well until your text files start getting large, after which things will start getting slow and memory-intensive. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Debug a service that starts on Bootup? (Python code)
2 Ideas: - Create a log file which you output your debug info to using file.write(). You can use the tail Linux command to see the latest data. -Have the program output using print as usual. At boot up, you have your program set as a background job. Whenever you want to monitor the program, you can use the linux command fg jobid to bring your task to the foreground. When finished monitoring, put it back to the background using ctrl-z then bg. You can find the job I'd using ps -aux. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Re: How to read binary (10101..) data from a device?
That looks like an inconvenient, non-standard protocol to interpret. Since there is no clock line, you can't rely on edges to signal the start of each bit(other than the start of the datagram). However the timing of the packet is consistent, so I would approach it based on timing. The data transmission rate is very slow(833 bits per second = 833Hz) so you may be able to sample the data accurately without using the PRUs. - Detect the rising edge to indicate the start of the packet Do the following 41 times: - Sample the data pin - Pause for 1.2ms -Verify that the message is valid by calculating the checksum My current language of choice is Python, so I would put this logic in a thread which runs independently of the main program thread and creates a valid, parsed data structure representing the contents of the packet. However, you can use any language you want though. NOTE: If you find that a lot of your of your packets are invalid then you should switch to using a PRU, which allows much more accurate sampling at higher rates. On Saturday, October 4, 2014 10:21:57 AM UTC-7, JJ wrote: Here's my situation: I have a device with four pins: GND, Vin, data and DTR. When DTR is pulled low, device sends digital data to the data line. I know the bit length and the data message length, but the question is, how can I read the data (zeros and ones) with a Beaglebone Black? Just to clarify, I need to read data from this device: https://www.john.geek.nz/2011/07/la-crosse-tx20-anemometer-communication-protocol/ However, it would be nice to know the principal of data capture/reading. For now I know only how to detect the start of the data transmission (rising edge) but everything else is unclear: what programming languages/libraries do I need?. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Re: Adafruit's idea of raw ADC values is wrong
Since the ADC reference voltage is 1.8V, the 1800 refers to the voltage range of ADC in millivolts. You should see a resolution of 1800mV/4096 = 0.4394mV. I guess it depends on your perspective whether or not raw means the actual 12-bit ADC register value or the ADC voltage itself. On Tuesday, September 30, 2014 1:03:34 PM UTC-7, c...@isbd.net wrote: I'm using the Adafruit BBIO library for reading ADC values. It has a very odd idea of 'raw' values. What it actually returns when you call the read_raw() function is a value 1800 times the processed value. This really isn't mainingful in any sort of way. The raw value should be the 12-bit ADC output, i.e. an integer in the range 0 to 4095, what you get is a floating point value in the range 0.0 to 1800.0. -- Chris Green · -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Re: Complete newbie
It's correct. The ~ in root@beaglebone:~# indicates that you are in the home directory, which starts out empty. if you do cd .., ls then you will see the standard directories. On Friday, September 19, 2014 7:51:46 PM UTC-7, jackson...@gmail.com wrote: All, I'm using the beagle bone to get back into computing so I'm new at Linux. I just powered up my Beagle Bone Black and got it connected to my MAC via SSH. I'm in via root and have the following prompt: Last login: Wed Apr 23 20:20:36 2014 from 192.168.7.1 root@beaglebone:~# I'm able to run some basic commands but am not seeing any directory structures or files. Is this correct or am I missing something? Thoughts? Thanks -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Re: prussdrv to remoteproc
I believe that PRUSpeak(https://github.com/deepakkarki/pruspeak/) makes use of remoteproc. I haven't made the transition yet, but I'm definitely curious about it. The complexity of implementing remoteproc seems much, much greater than using UIO or /dev/mem mapping. What is the benefit of using remoteproc over the other methods? On Friday, September 12, 2014 5:57:17 AM UTC-7, Cedric Malitte wrote: Le vendredi 12 septembre 2014 04:11:18 UTC-4, Jon E a écrit : Hi, Anyone know of example code that's using the newer remoteproc interface? Also, is there a way to convert pasm binary files to elf format for the firmware loader? Would like to play around with the latest 3.14 TI kernel, but haven't been able to find much info on the PRU side.. Thanks, Jon As I read here http://processors.wiki.ti.com/index.php/PRU-ICSS_Getting_Started_Guide There are some examples included in the SDK. I'm downloading it to check that, but for now i'm still using the old patch method to enable pruss :) Regards, Cedric -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Re: Boards abilities
There are more than a few comparison articles online. Some I've bookmarked in my journey are: http://makezine.com/magazine/how-to-choose-the-right-platform-raspberry-pi-or-beaglebone-black/ http://www.doctormonk.com/2013/07/raspberry-pi-vs-beaglebone-black.html http://lifehacker.com/how-to-pick-the-right-electronics-board-for-your-diy-pr-742869540 Based on your criteria, either board will work fine. Note that BBB is truly plug-and-play while the Raspberry Pi requires some (minimal) setup preparation. On Wednesday, September 10, 2014 9:17:14 AM UTC-7, kev...@havenschools.com wrote: As I look at the Beaglebone, Raspberry Pi, etc, I see the possibility of using this small platform to carry curricula. Would like input on the Beagleboard Black and the Beagleboard. I have been developing Special Education curricula over the past decade, and have the idea of placing everything I've developed onto a board for a student to use independently. My thought was to have a Linux operating system preloaded with all the curricula, PDFs, html, videos, etc. The student would simply have a plug and play access to all the resources on the board. I would like some feedback from users if the platforms could support this idea. I have the very little knowledge in this area and looking to learn. Any input on function, Pros and Cons of each board If this is feasible I would prototype for beta within 1 month and demo in October. Thanks, Ken -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Re: how stop my buzzer
Mixing digitalWrite and analogWrite could be the problem. Try disabling the buzzer by setting the PWM duty cycle to 0: if(data =='stop'){ b.analogWrite(S_13,0,3); console.log('stop buzz'); }; On Wednesday, September 3, 2014 12:14:31 PM UTC-7, keo@gmail.com wrote: I all, I success my test outpout buzz . I have a 3 buttons low frequance (on), hight frequence(off), stop sound. I use io.sockets Saisissez io.sockets.on('connection', function (socket) { socket.on('led', function (data) { console.log(data); if(data =='stop'){ b.digitalWrite(S_13,b.HIGH); console.log('stop buzz'); }; if (data == 'on'){ b.analogWrite(S_13,1/2,3); //socket.emit('ledstatus', 'green'); //socket.broadcast.emit('ledupdate', 'green'); }else{ b.analogWrite(S_13,1/2,200); //socket.emit('ledstatus', 'red'); //socket.broadcast.emit('ledupdate', 'red'); } }); }); if I clik low buzz and hight buzz is ok , but if I want stop buzzer, the buzzer not stop Why ? console log is display stop buzz when i click stop console log is display on when i click on console log is display off when i click off I try configure S_13 too HIGH but is have the PWM in this poin. How I can do ? thank's for reply how i can stop the buzzer -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] Re: Yet another newbie how to get started
If you have an editor-of-choice(eg Sublime Text), there's a handy trick for using it remotely without needing to constantly save-upload your files. This works on Windows using WinSCP: 1) Open WinSCP and connect to the BBB 2) Create the empty source file on the BBB(main.c for example) 3) Right Click on the source file, select Open, and the file should open in the editor(if it's the default program) 4) Now anytime you save the file, it will automatically upload the saved file to the BBB for you. My next step is to setup Guard(https://github.com/guard/guard), so that whenever a source file is saved on the BBB in a project directory, it will trigger the gcc compiler automatically. On Tuesday, September 2, 2014 7:53:07 PM UTC-7, William Pretty Security wrote: Worked ok for me J Some of the software he installs manually is now included in the Eclipse package manager. I haven’t tried the remote debugger yet, because I just downloaded it ……. No one could make a greater mistake than he who did nothing because he could do only a little. All that is necessary for the triumph of evil is that good men do nothing Edmond Burke *(1729 - 1797)* http://www.packtpub.com/building-a-home-security-system-with-beaglebone/book *From:* beagl...@googlegroups.com javascript: [mailto: beagl...@googlegroups.com javascript:] *On Behalf Of *William Hermans *Sent:* Tuesday, September 02, 2014 10:45 PM *To:* beagl...@googlegroups.com javascript: *Subject:* Re: [beagleboard] Re: Yet another newbie how to get started That blog / Video is meant for the beaglebone white. There will be enough differences with those instructions for the uninitiated to get in way over their head. e.g. it will lead into another circle of frustration. On Tue, Sep 2, 2014 at 7:39 PM, Joshua Datko jbd...@gmail.com javascript: wrote: murrellr-ywtbtysyrb+lz21kgmr...@public.gmane.org javascript: writes: 1. Load Putty on my PC. 2. Establish a SSH terminal session to the board. 3. Write my program using VIM (a horrible program to drop on a novice, it has a very steep learning curve) or nano (not much better). 4. Compile and link my program with gcc, after having to learn its command-line interface. 5. Run my program under the gnu debugger, another command-line tool with a steep learning curve. I use Emacs. It's much better than vim. (/me ducks and runs after trolling a holy war... :p ) So, now my question. Is there a easy to use, Windows, graphical integrated development environment for developing native Angstrom Linux programs for this board? I don't use Eclipse, but those that do AND work on the BeagleBone say that Derek Molloy has a good tutorial on setting up a GUI IDE: http://derekmolloy.ie/beaglebone/setting-up-eclipse-on-the-beaglebone-for-c-development/ -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4745 / Virus Database: 4015/8145 - Release Date: 09/02/14 -- No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4745 / Virus Database: 4007/8033 - Release Date: 08/14/14 Internal Virus Database is out of date. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] Python script stops reading serial port after several days
I think Miguel's logging idea is the best way to know exactly what's going on. Some additional thoughts: Based on code, if your program stops receiving data but still runs then it is probably infinitely blocking at arduino.readline(). The fact that you don't see output from print(line) or print str(LAST_UPDATED) further supports that. Perhaps there was a transmission error at some point and the two went out of sync(eg the stop bit is never detected)? When you restart the script(and re-establish the serial connection), things work fine. You could try... -Lowering the baud rate. You can check the AVR data sheet, but I think the Arduino's error rate is higher for 115kbps than for say 9600bps. The frequency of your data(based on your sample) doesn't necessarily require a 115kbps transmission rate. -Adding a timeout to the serial.Serial() constructor. Then do something like: while True: line = None line = arduino.readline() if line is None: arduino.close() arduino = serial.Serial(...) else: #Do all the Xively/email stuff (This is just a guess, since I don't know exactly what timeout does: raise an error, returns None, returns junk? You'll have to experiment.) Hope that helps. On Tuesday, September 2, 2014 7:23:28 AM UTC-7, Miguel Aveiro wrote: Hi Chris, I don't think the problem is related to the serial port itself. I have a python code that uses 4 serial ports of BBB (tty01, tty02, tty04, tty05) running without any problem for months. I saw your code. If it reaches the Dropping out due to an error: , I don't think it will keep running. Use the logging module to write to a file when there is an exception: https://docs.python.org/2/howto/logging.html Use repr() instead of the str() to show the error, as it returns a string containing a printable representation of an object., and it is easier to see what's wrong. https://docs.python.org/2/library/functions.html#func-repr If you catch the problem with the logging module, send an email and I can help you with more details. Miguel On 31-08-2014 22:55, chrism...@gmail.com javascript: wrote: Hi everyone! I've got my BBB rev. C set up as a data logger for a serial data stream from an Arduino. It basically takes this data, uploads it to xively, and checks certain values for exceeded thresholds and sends an email if found. This works fine. However, after the script has been running for several days, it stops working. The script itself seems to continue running, but it stops acknowledging that it's receiving any data or trying to upload to xively. If I ctrl+c out of the script and restart it, it starts working fine again. The device it's connected to continues to work properly regardless of whether the BBB is logging anything, so I don't believe that the problem is with it. Is there any way to determine where the problem lies? (BBB, python, etc.?) Here's a copy of my code (please don't mock it too much, I'm a Python noob) : http://susepaste.org/399d9d1f (This is what the data looks like if it makes any difference: 2014-08-31 20:51:38.841985 91,h,44 2014-08-31 20:51:40.063139 92,t,72 2014-08-31 20:51:44.727206 92,h,42 2014-08-31 20:51:45.463794 90,t,71 2014-08-31 20:52:17.112091 90,h,44 ...) I've Googled around, and haven't really found anything regarding something like this. There were a couple of random bulletin board posts that seemed similar, but they all went off into no-answer-land. Thanks in advance :) -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] Python script stops reading serial port after several days
I should add that the timeout should be larger than the largest expected gap between each data transmission. For example if you expect data coming in every minute, then set the timeout to be 2 minutes. If no data comes in for 2 minutes, then you know something is wrong. On Tuesday, September 2, 2014 10:29:12 PM UTC-7, Michael M wrote: I think Miguel's logging idea is the best way to know exactly what's going on. Some additional thoughts: Based on code, if your program stops receiving data but still runs then it is probably infinitely blocking at arduino.readline(). The fact that you don't see output from print(line) or print str(LAST_UPDATED) further supports that. Perhaps there was a transmission error at some point and the two went out of sync(eg the stop bit is never detected)? When you restart the script(and re-establish the serial connection), things work fine. You could try... -Lowering the baud rate. You can check the AVR data sheet, but I think the Arduino's error rate is higher for 115kbps than for say 9600bps. The frequency of your data(based on your sample) doesn't necessarily require a 115kbps transmission rate. -Adding a timeout to the serial.Serial() constructor. Then do something like: while True: line = None line = arduino.readline() if line is None: arduino.close() arduino = serial.Serial(...) else: #Do all the Xively/email stuff (This is just a guess, since I don't know exactly what timeout does: raise an error, returns None, returns junk? You'll have to experiment.) Hope that helps. On Tuesday, September 2, 2014 7:23:28 AM UTC-7, Miguel Aveiro wrote: Hi Chris, I don't think the problem is related to the serial port itself. I have a python code that uses 4 serial ports of BBB (tty01, tty02, tty04, tty05) running without any problem for months. I saw your code. If it reaches the Dropping out due to an error: , I don't think it will keep running. Use the logging module to write to a file when there is an exception: https://docs.python.org/2/howto/logging.html Use repr() instead of the str() to show the error, as it returns a string containing a printable representation of an object., and it is easier to see what's wrong. https://docs.python.org/2/library/functions.html#func-repr If you catch the problem with the logging module, send an email and I can help you with more details. Miguel On 31-08-2014 22:55, chrism...@gmail.com wrote: Hi everyone! I've got my BBB rev. C set up as a data logger for a serial data stream from an Arduino. It basically takes this data, uploads it to xively, and checks certain values for exceeded thresholds and sends an email if found. This works fine. However, after the script has been running for several days, it stops working. The script itself seems to continue running, but it stops acknowledging that it's receiving any data or trying to upload to xively. If I ctrl+c out of the script and restart it, it starts working fine again. The device it's connected to continues to work properly regardless of whether the BBB is logging anything, so I don't believe that the problem is with it. Is there any way to determine where the problem lies? (BBB, python, etc.?) Here's a copy of my code (please don't mock it too much, I'm a Python noob) : http://susepaste.org/399d9d1f (This is what the data looks like if it makes any difference: 2014-08-31 20:51:38.841985 91,h,44 2014-08-31 20:51:40.063139 92,t,72 2014-08-31 20:51:44.727206 92,h,42 2014-08-31 20:51:45.463794 90,t,71 2014-08-31 20:52:17.112091 90,h,44 ...) I've Googled around, and haven't really found anything regarding something like this. There were a couple of random bulletin board posts that seemed similar, but they all went off into no-answer-land. Thanks in advance :) -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] Re: Yet another newbie how to get started
John, that's an even better trick.. thanks! I'll try it out for my next project. On Tuesday, September 2, 2014 9:04:16 PM UTC-7, john3909 wrote: From: Michael M mmcda...@gmail.com javascript: Reply-To: beagl...@googlegroups.com javascript: beagl...@googlegroups.com javascript: Date: Tuesday, September 2, 2014 at 8:49 PM To: beagl...@googlegroups.com javascript: beagl...@googlegroups.com javascript: Subject: Re: [beagleboard] Re: Yet another newbie how to get started If you have an editor-of-choice(eg Sublime Text), there's a handy trick for using it remotely without needing to constantly save-upload your files. This works on Windows using WinSCP: 1) Open WinSCP and connect to the BBB 2) Create the empty source file on the BBB(main.c for example) 3) Right Click on the source file, select Open, and the file should open in the editor(if it's the default program) 4) Now anytime you save the file, it will automatically upload the saved file to the BBB for you. That is way to complicated. Just access rootfs via NFS so now you are editing BBB files on your desktop. Now you can use sublime or eclipse projects locally on your desktop. Everything works much quicker. Regards, John My next step is to setup Guard(https://github.com/guard/guard), so that whenever a source file is saved on the BBB in a project directory, it will trigger the gcc compiler automatically. On Tuesday, September 2, 2014 7:53:07 PM UTC-7, William Pretty Security wrote: Worked ok for me J Some of the software he installs manually is now included in the Eclipse package manager. I haven’t tried the remote debugger yet, because I just downloaded it ……. No one could make a greater mistake than he who did nothing because he could do only a little. All that is necessary for the triumph of evil is that good men do nothing Edmond Burke *(1729 - 1797)* http://www.packtpub.com/building-a-home-security-system-with-beaglebone/book *From:* beagl...@googlegroups.com [mailto:beagl...@googlegroups.com] *On Behalf Of *William Hermans *Sent:* Tuesday, September 02, 2014 10:45 PM *To:* beagl...@googlegroups.com *Subject:* Re: [beagleboard] Re: Yet another newbie how to get started That blog / Video is meant for the beaglebone white. There will be enough differences with those instructions for the uninitiated to get in way over their head. e.g. it will lead into another circle of frustration. On Tue, Sep 2, 2014 at 7:39 PM, Joshua Datko jbd...@gmail.com wrote: murrellr-ywtbtysyrb+lz21kgmr...@public.gmane.org writes: 1. Load Putty on my PC. 2. Establish a SSH terminal session to the board. 3. Write my program using VIM (a horrible program to drop on a novice, it has a very steep learning curve) or nano (not much better). 4. Compile and link my program with gcc, after having to learn its command-line interface. 5. Run my program under the gnu debugger, another command-line tool with a steep learning curve. I use Emacs. It's much better than vim. (/me ducks and runs after trolling a holy war... :p ) So, now my question. Is there a easy to use, Windows, graphical integrated development environment for developing native Angstrom Linux programs for this board? I don't use Eclipse, but those that do AND work on the BeagleBone say that Derek Molloy has a good tutorial on setting up a GUI IDE: http://derekmolloy.ie/beaglebone/setting-up-eclipse-on-the-beaglebone-for-c-development/ -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4745 / Virus Database: 4015/8145 - Release Date: 09/02/14 -- No virus found in this message. Checked by AVG - www.avg.com Version: 2014.0.4745 / Virus Database: 4007/8033 - Release Date: 08/14/14 Internal Virus Database is out of date. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- For more options, visit http://beagleboard.org/discuss
[beagleboard] Re: Camera Output Processing Platform Suggestions
I think there are too many unknowns, and a lack of benchmarks on the BBB, to give you a yes or no answer. My suggestion would be to get a BBB. (Or if you only have one chance, get the fastest embedded system you have budget for). Then you develop your algorithm until it works. If it's slow, then try the following: -Modify your algorithm to reduce costly steps -Reduce the video resolution for image processing. -Reduce the video framerate for image processing -Create a buffer where you process a chunk of video, and only stream the video to the user once X seconds of processed video is available. Note that GPIO is not an issue for the CPU if you use the built-in PRUs, which are two 32-bit microcontrollers embedded in the main BBB processor. They operate at 200MHz and are independent from the host and each other(but can still communicate with each other and the host). Another option is to develop on your computer and draw conclusions from there. EG. If your 2.4GHz multicore laptop is at 98% utilization when processing the video in real-time, then you know that the BBB will not be able to handle it real-time. On Sunday, August 24, 2014 9:15:48 PM UTC-7, PRABHJOT SINGH wrote: Hey thanks for immediate reply. But to add the same camera streaming data need to be shown in an front-end application. Also the display would be a touchscreen one. And a few GPIOs also will be used. All these also add up to the CPU overhead. If BBB still be able to perform well? -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Re: Camera Output Processing Platform Suggestions
Yes, this sounds like a perfect use case for the BeagleBone Black, a webcam, and OpenCV. Take a look at this: http://derekmolloy.ie/beaglebone/beaglebone-video-capture-and-image-processing-on-embedded-linux-using-opencv/ A few things to consider: -Depending on the duration and resolution of the video, you may need to hook up something like an external HD or high-capacity SD card to store everything. The BBB Rev C only has 4GB out-the-box, which is shared with the operating system. -The BBB has a 1GHz processor, which could have trouble performing computer vision algorithms in real-time. You may need to write the video straight to disk, then have a separate process perform the algorithms on the recorded video. On Sunday, August 24, 2014 8:27:10 PM UTC-7, PRABHJOT SINGH wrote: Hello Everyone!! We are working on an application that requires the continuous monitoring of camera output implemented on a stand-alone embedded system, without using a PC https://www.youtube.com/watch?v=XCsXgCqdAzk The video shows a powder kept in a tube that liquefies due to its internal reactions over a period of time. We wanted to analyze this change in state of the powder. The processor should be able to capture and analyze the images (video stream), during the reaction period, for the change in state taking place. We want to track the changes in the video frames to analyze the change in the state of the powder without using an additional PC If Beaglebone Black will be suitable for such application? -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] Re: How to send commands to BBB wirelessly
You'll have two separate programs for the BBB(socket server) and the computer(socket client). In your case, the BBB will program will infinitely loop, waiting for messages. The computer will be event-driven, only sending messages when a gesture has been detected. You should google C++ sockets and start from there. This type of tedious research is the price(and ultimately reward) for working on a cool project. On Friday, August 22, 2014 5:45:29 AM UTC-7, Ved Prakash Pandey wrote: Thank you so much Michael. :) I read about socket connections. How can I use it to send data from my C++ code on computer? And how can I have a code on my BBB (again in C++) accept the data sent from my computer? It'll be of great help if you suggest references from where I can learn more about sending data to devices through my code on PC. Thank you again! :) -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Re: How to send commands to BBB wirelessly
If you can, maybe avoid the file on harddisk and talk directly to the BBB. The simplest way might be to create a socket connection over WIFI... you could have the BBB host the socket server and connect to it from the host computer using the exposed IP and port. You can then send data through the socket connection to the BBB. For gesture control, I recommend using something like a Leap Motion or Myo armband. OpenCV would also work, but you'll be spending a lot of time dealing with issues associated with vision-based systems and even then, it will only work in certain rigid lighting conditions. On Thursday, August 21, 2014 9:36:12 AM UTC-7, Ved Prakash Pandey wrote: I am building a quadcopter project. I want to use OpenCV and C++ language to detect hand gestures to control the quad. The idea is to detect the gesture then write commands (to move forward, backwards, etc.) to a file on harddisk and then have BBB read commands from that file over WiFi. I know how to write to a file using C++, but don't know how to go beyond that. Please help. Also, if there's some better way to acheive the gesture control, please recommend. Thank you! :) -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] VisualPRU: Browser-based Editor and Debugger for the PRUs
Thanks! Hope it's helpful to other budding PRU programmers. I considered using Node.js for this project but decided to give Python a chance. Since only 1 user connects to the backend at any given time, there is no performance difference between the two. -Michael On Wednesday, August 20, 2014 3:06:15 PM UTC-7, William Hermans wrote: Looks good so far Michael. I was considering doing something similar, but with Nodejs. For the learning experience, and still may. On Wed, Aug 20, 2014 at 11:36 AM, Michael M mmcda...@gmail.com javascript: wrote: Hi all, I made a browser-based app or writing and debugging PRU assembly programs. It's designed to be more user-friendly compared to the current PRU debuggers available. More Details and installation instructions are on Github: https://github.com/mmcdan/visualpru It's still in the early stages, however it's been very helpful when writting PRU programs. Let me know if you have any suggestions, feature requests, or issues to report! Best, Michael -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] VisualPRU: Browser-based Editor and Debugger for the PRUs
Hi all, I made a browser-based app or writing and debugging PRU assembly programs. It's designed to be more user-friendly compared to the current PRU debuggers available. More Details and installation instructions are on Github: https://github.com/mmcdan/visualpru It's still in the early stages, however it's been very helpful when writting PRU programs. Let me know if you have any suggestions, feature requests, or issues to report! Best, Michael -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Re: Working with python on Beagle Bone Black
Yes. This https://www.youtube.com/watch?v=wui_wU1AeQc will explain how to access GPIO in detail. On Saturday, August 9, 2014 10:09:58 AM UTC-7, Jesus Rincon wrote: Thanks for your information. As I say I'm new in this but, can I access GPIO from the OS desktop? I see always that they acces via SSH I'm not sure if I can do this via Terminal in the OS desktop El jueves, 7 de agosto de 2014 18:04:39 UTC-5, Michael M escribió: I want to know first, beacause I've never worked with python on beagle bone black, if I can make a small Human Machine Interface, that runs in the beagle bone, and also which operative system is the adequate to work with this. -Yes you can. Anything you can do on a linux desktop/laptop, you can do on the beaglebone black(with varying levels of performance). Any OS would work(Angstrom, Debian, Ubuntu, Android, etc...), but it's probably easiest to use the default debian installation on the newer BBB Rev C. You can use QT, a browser-based GUI, or any other graphical toolkit you can think of. On Thursday, August 7, 2014 1:47:21 PM UTC-7, Jesus Rincon wrote: Hi everyone, I would like to ask this to some people that had worked with python on Beagle Bone Black I'm working recently on a project that involves gas sensors and clasification technices. I'm trying to implement on my board PCA for parameter clasfication purposes, I will work with python. I want to know first, beacause I've never worked with python on beagle bone black, if I can make a small Human Machine Interface, that runs in the beagle bone, and also which operative system is the adequate to work with this. Thanks In advance, I'm fully open to information and ideas that you can give me. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Re: Working with python on Beagle Bone Black
I want to know first, beacause I've never worked with python on beagle bone black, if I can make a small Human Machine Interface, that runs in the beagle bone, and also which operative system is the adequate to work with this. -Yes you can. Anything you can do on a linux desktop/laptop, you can do on the beaglebone black(with varying levels of performance). Any OS would work(Angstrom, Debian, Ubuntu, Android, etc...), but it's probably easiest to use the default debian installation on the newer BBB Rev C. You can use QT, a browser-based GUI, or any other graphical toolkit you can think of. On Thursday, August 7, 2014 1:47:21 PM UTC-7, Jesus Rincon wrote: Hi everyone, I would like to ask this to some people that had worked with python on Beagle Bone Black I'm working recently on a project that involves gas sensors and clasification technices. I'm trying to implement on my board PCA for parameter clasfication purposes, I will work with python. I want to know first, beacause I've never worked with python on beagle bone black, if I can make a small Human Machine Interface, that runs in the beagle bone, and also which operative system is the adequate to work with this. Thanks In advance, I'm fully open to information and ideas that you can give me. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] advice on the project
Since you have a working driver, you can: 1)Identify the events begin emitted from your input device using: cat /proc/bus/input/devices 2)Capture the data from the input device using: ls /dev/input to find your device's event output then cat the appropriate file for the actual data. You may have to look at the driver to understand what type of events are being sent(read: https://www.kernel.org/doc/Documentation/input/event-codes.txt). If you're lucky, you'll get absolute events being sent or relative events with a known origin position. This is all speculation though from a little online research. Good Luck! On Thursday, July 3, 2014 3:26:46 PM UTC-7, janszyma...@gmail.com wrote: thanks, that helps. On Thursday, July 3, 2014 12:38:15 AM UTC+10, Dieter Wirz wrote: On Wed, Jul 2, 2014 at 3:42 AM, janszyma...@gmail.com wrote: Hi, I have to implement a ball and plate project using BBB. I have the IR touchscreen connected on USB and the driver is working with a current Debian distribution, so I can see the mouse cursor moving when the ball is moving. What is the easiest way to read the absolute mouse position? After reading the position, it has to be sent frequently over UART to another microsystem. Any advice on how to approach the coding of absolute mouse position? Jan Have a look at xdotool; eval $(xdotool getmouselocation --shell); echo $X,$Y -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [beagleboard] Using bitwise not(~) gives syntax error - Can't clear multiple bits at once
That makes perfect sense. Thanks Bas! On Monday, June 30, 2014 4:27:47 PM UTC-7, Bas Laarhoven wrote: Michael, Look at it this way: The data type is always 32 bits. (13) or 0x0008 can be used as 8-bit number without data loss. ~(13) or 0xFFF7 can't be used as an 8-bit number without data loss. If you keep this in mind when coding you'll be safe. The assembler is rather simple in parsing the input. It probably just compares the parsed 32-bit result with the allowed range (0-255). -- Bas On 1-7-2014 1:02, Michael M wrote: Hi Bas, You are right! The following works: AND r3.b0, r3.b0, (~(13) 0xff)// Clear bit 3 It's strange that (13) is interpreted as 8-bit, but ~(13) is interpreted as 32-bit. It appears to be an undocumented quirk of using this operator? Thanks for your help! On Monday, June 30, 2014 2:33:51 PM UTC-7, Bas Laarhoven wrote: Hi, Have you tested masking the ~(13) to 8-bits ? It's possible that the assembler sees a 32-bit constant where only an 8-bit value is allowed. -- Bas On 30-6-2014 22:04, Michael M wrote: Hello, I've written a PRU program which manipulates bits in one of the registers. The program does not compile with PASM when I use the ~ operator. Setting multiple bits works: or r3.b0, r3.b0, 13// Set bit 3 but clearing multiple bits does not: and r3.b0, r3.b0, ~(13)// Clear bit 3 The exact compiler error is Error: Syntax error in parameter 3. This should work since it comes straight from the TI wiki on the PRU: http://processors.wiki.ti.com/index.php/PRU_Assembly_Instructions#Bitwise_AND_.28AND.29 Is this a bug or am I doing something wrong? Thanks, Michael -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Using bitwise not(~) gives syntax error - Can't clear multiple bits at once
Hello, I've written a PRU program which manipulates bits in one of the registers. The program does not compile with PASM when I use the ~ operator. Setting multiple bits works: or r3.b0, r3.b0, 13// Set bit 3 but clearing multiple bits does not: and r3.b0, r3.b0, ~(13)// Clear bit 3 The exact compiler error is Error: Syntax error in parameter 3. This should work since it comes straight from the TI wiki on the PRU: http://processors.wiki.ti.com/index.php/PRU_Assembly_Instructions#Bitwise_AND_.28AND.29 Is this a bug or am I doing something wrong? Thanks, Michael -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Re: Device Tree Overlay pinmux modification doe not modify the physical pin or the file interface values
Thanks for the info Serge! I did some more tests, and it looks like applying the DTO will set some parameters of the pin, but not others. You always need to manually set the state using the files in order to get a guaranteed state. For example, let's say that I set a pin to be an Input w/ a pullup using the DTO. The actual pin may still be set to an output. But if I manually set the pin as an input using direction file, then the input pin will read high due to the pullup set in the DTO. Similarly... if a pin is set w/ a pulldown in the DTO, then the actual pin will read low only when you switch it to an input using the direction file. It seems strange that a pin set as an input in the DTO could be set as an output using the files(and vice versa), but I guess that's just how it works. Need to be very careful to avoid inconsistent pin states. On Saturday, June 21, 2014 9:14:41 PM UTC-7, serge...@gmail.com wrote: Hi Michael When I do 'cat value' in the gpio48 directory, I get 1. I should get a 0 since the pulldown is enabled. To my experience the 'cat value' not always reflects actual level on the wire. and Should modifications in the DTO reflect in the file interfaces and on the physical pin itself, DTO modifications not always change the pinmux settings or pin state. (For example uEnv.txt settings might override them) I concluded useless to study roots of every case, as well as got tired from checking pinmux settings and wire levels every time I connect new device to the system, and wrote small linux utility showing the punmux settings, GPIO configurations, and wire levels(if GPIO receiver enabled). Maybe it will be helpful in your case, to understand what is where: www.academ.org/~sv/epc/pinmux.pdf Serge -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[beagleboard] Device Tree Overlay pinmux modification doe not modify the physical pin or the file interface values
The changes I make to the pinmux in the Device Tree Overlay are not reflected when I read the files in /sys/class/gpio or probe the physical pin itself. However, the change IS reflected when I read /sys/kernel/debug/pinctrl/44e10800.pinmux/pins. The OS is the Rev C Debian build. Setting the Pin to an input w/ a pulldown: -In my Device Tree Overlay file, I set GPIO pin P9_15(referred to as 48 by the kernel and having offset address 0x040) to be an input pin with a pulldown resistor(register value 0x27). -I echo the appropriate overlay to '/sys/devices/bone_capemgr.9/slots' -When when I do a 'cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | grep '840' ' , I get 'pin 16 (44e10840) 0027 pinctrl-single'. This indicates that the pin is correctly set as an input and with a pulldown resistor. -When I do 'cat value' in the gpio48 directory, I get 1. I should get a 0 since the pulldown is enabled. Setting the pin to an output: -In my Device Tree Overlay file, I set GPIO pin P9_15(referred to as 48 by the kernel and having offset address 0x040) to be an output pin (register value 0x07). -I echo the appropriate overlay to '/sys/devices/bone_capemgr.9/slots' -When when I do a 'cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pins | grep '840' ' , I get 'pin 16 (44e10840) 0007 pinctrl-single'. This indicates that the pin is correctly set as an output. -When I do 'cat direction' in the gpio48 directory, I get 'in'. I should get 'out' since the pin is set as an output. If I manually set the direction,value, etc... by echoing to the file interfaces, then everything works perfectly. Should modifications in the DTO reflect in the file interfaces and on the physical pin itself, or is my understanding incorrect? Derek Molloy encounters this same issue in his GPIO video (https://www.youtube.com/watch?v=wui_wU1AeQc @31:00). Thanks! Michael FYI, here is one of the DTOs: /* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Purpose License Version 2 as * published by the Free Software Foundation * */ /dts-v1/; /plugin/; /{ compatible = ti,beaglebone, ti,beaglebone-black; part-number = MM-LED-TEST; version = 00A0; fragment@0 { target = am33xx_pinmux; __overlay__ { pinctrl_LED: pinctrl_LED { pinctrl-single,pins = 0x040 0x27 /* P9_15(48): Input w/ pulldown resistor*/ ; }; }; }; fragment@1 { target = ocp; __overlay__ { helper { compatible = bone-pinmux-helper; pinctrl-names = default; pinctrl-0 = pinctrl_LED; status = okay; }; }; }; }; -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups BeagleBoard group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.