**** BEGIN LOGGING AT Sun Jul 05 03:01:09 2020 Jul 05 05:07:29 There was a guy on this site who knew how. Let me check the site. Jul 05 05:29:53 Hello All, I am new to beaglebone black and when i am trying to run demo script i am getting error : Bonescript: initialized Jul 05 05:30:20 do anyone have solution for this ? **** BEGIN LOGGING AT Sun Jul 05 19:03:36 2020 Jul 05 19:05:51 and is /sys/class/i2c-adapter/i2c-2/2-0070/pwm/pwmchip9/pwm-9:0/enable a binary file? Jul 05 19:09:47 Text file right? Jul 05 19:14:59 but the overlay is in byte format... Jul 05 19:33:05 Would I need elevated permissions to run a python3 file that grabs data from the overlay BBORG_SERVO-00A0.dtbo? Jul 05 19:33:50 I tested it. That is not it. Jul 05 19:40:56 I am probably on the wrong pwmchip right now. Sheesh. Jul 05 19:48:23 Nope. I think I referenced the incorrect locations. Jul 05 20:05:04 Man. Break time. Sheesh. Jul 05 20:31:49 set_ logs in and a massive net split happens I tell ya. Jul 05 20:32:26 Ha. Thank you for some credit. Jul 05 20:32:38 linode! Jul 05 20:33:42 set_: also, the stuff you said earlier makes no sense. you don't need the "grab data from the overlay", you don't do anything at all with an overlay other than enable it in /boot/uEnv.txt, which you clearly have Jul 05 20:33:47 and that sysfs path looks fine to me Jul 05 20:34:12 and no, the enable-attribute of a pwm channel is not a binary file, almost everything in sysfs is text Jul 05 20:35:19 so you're not on the wrong pwmchip, you probably simply failed in however you tried to "test" it Jul 05 20:36:03 also no, you don't need elevated permissions Jul 05 21:03:34 should I use /sys/class or /sys/bus for making the overlay work w/ file handling? Jul 05 21:04:12 pineapple Jul 05 21:04:42 Let me rearrange my question. Jul 05 21:04:57 preferably into something that _does_ make any sense Jul 05 21:05:38 though regardless, pwm devices live in /sys/class/pwm/ Jul 05 21:05:59 Let me show you the sh script. Jul 05 21:07:02 https://pastebin.com/ZeDpEUCz has the second line as the line of interest. Jul 05 21:07:29 Can I replicate that line in a python file and have it work? Jul 05 21:11:24 This is what I am trying to make work: https://pastebin.com/zS418jTG Jul 05 21:11:30 set_: https://pastebin.com/NEmUq47a Jul 05 21:11:45 Now, it runs. Of course but it does not activate the pwm channel 9. Jul 05 21:11:52 sorry pwmchip9. Jul 05 21:12:01 that python code is complete nonsense Jul 05 21:12:07 Okay. Jul 05 21:12:31 I was reading about glob and did not grasp it yet. Jul 05 21:12:35 like, almost every single line is nonsense Jul 05 21:12:50 I was trying to read and write to the file. Jul 05 21:12:58 It works but does nothing. Jul 05 21:15:46 set_: like, it mostly demonstrates that you still don't understand even the slightest thing about python, and have no mental model whatsoever of what code does. you're just randomly stringing fragments of code together and hoping it somehow magically does something Jul 05 21:16:23 Okay. So, using a wrapper from a gpio.c and gpio.h file would be better? Jul 05 21:16:31 have you considered maybe looking for a python tutorial? Jul 05 21:16:50 I have no clue what you mean by that, but given that you don't even understand python you should probably not be messing with C code Jul 05 21:16:56 I have read many tutorials on the PCA9685 and some were in Python. Jul 05 21:16:57 and thw pwm sysfs interface has nothing to do with gpio Jul 05 21:17:05 Right. Jul 05 21:17:07 Okay. Jul 05 21:17:16 no, not a tutorial on the PCA9685, a python tutorial. Jul 05 21:17:38 for glob or os or sys? Jul 05 21:17:43 Yes. Jul 05 21:17:45 for python Jul 05 21:18:00 your code makes it clear that you don't understand anything about its syntax or semantics Jul 05 21:18:11 Python yes. I have had many tutorials on it. Jul 05 21:18:21 well they clearly didn't pay off :P Jul 05 21:18:22 Okay. I typed a.write("1") too. Jul 05 21:18:24 Ha. Jul 05 21:18:26 Okay. Jul 05 21:18:32 It works the same. Jul 05 21:18:56 but honestly I don't really have the energy right now, maybe someone else does Jul 05 21:19:04 Anyway, I guess I will try to find out how to use glob now. Jul 05 21:19:07 Okay. NO issue. Jul 05 21:19:25 I mean, I literally showed you how to use it Jul 05 21:19:43 Okay. Jul 05 21:19:44 Okay. Jul 05 21:19:58 my tiny bone_pinmux module ( https://pastebin.com/MKtWJ8G8 ) also demonstrates reading and writing sysfs attributes Jul 05 21:20:04 anyway, afk Jul 05 21:20:10 Otay. Jul 05 21:20:12 Later for now. Jul 05 21:24:12 hey hey hey Jul 05 21:27:03 zmatt: HEy you here Jul 05 21:27:18 I am working on my PRU code Jul 05 21:29:25 I think he just left. Jul 05 21:29:42 I made him angry b/c of how little I know about Python. Jul 05 21:31:43 i should put together a class on PRU Jul 05 21:36:20 that would be great Jul 05 21:36:36 I made some head way but there are big gaps Jul 05 21:36:47 what would you like to see ? Jul 05 21:37:11 I see a lot of questions and people talk about things such limited terms. Jul 05 21:37:19 there is so much that can be done on the PRU Jul 05 21:37:21 this is from the vantage point of someone with some computer knowledge Jul 05 21:37:31 but by no means well versed Jul 05 21:37:48 like it took me a while to understand the difference between register and a spot in memory Jul 05 21:38:09 now that my HD15 connectors have arrived, I should get the VGA output for the PocketBeagle done Jul 05 21:38:32 the way the OS can interact with the PRU is a mystery still for me especially with rproc Jul 05 21:38:33 heh 'memory'? that's an ambigous term when it comes to PRUs Jul 05 21:39:13 even with uio Jul 05 21:39:29 some of it has to do with my lack of knowledge of OS and how computers work Jul 05 21:39:35 rproc is a framework for talking to other processors so the interactions are pretty open; UIO is largely a cleaned up bare metal access Jul 05 21:39:42 but there has to be a way of providing the required knowledge so you do not need a CS degree Jul 05 21:39:52 * ds2 looks around Jul 05 21:40:01 a CS degree would make it much less understandable :D Jul 05 21:40:05 * ds2 ducks Jul 05 21:40:29 but have enough to work with these low level concepts Jul 05 21:40:32 also interupts Jul 05 21:40:41 and setting up the resource_table.h Jul 05 21:40:47 no clue how to do that Jul 05 21:41:17 I think I see where you are going. I think you have been mixing and matching 3-4 generations of how to do things on the PRU Jul 05 21:41:27 exactly Jul 05 21:41:32 for most of beagle bone stuff Jul 05 21:41:38 there seems to be waves of info Jul 05 21:41:50 a lot of stupp is 2012-2014 Jul 05 21:41:54 how would it clear things up for you? Jul 05 21:42:34 hard to say until I fully transverse the chasm. Zmatt has been helpful but I have completely reliant on his py-uio Jul 05 21:42:53 I would like to redo everything I am doing with rproc and C eventually when I am under less time pressure Jul 05 21:43:10 the PRU cookbook Jul 05 21:43:10 why C? Jul 05 21:43:13 has a good start Jul 05 21:43:18 i wanna learn C Jul 05 21:43:35 but C really isn't suitable for this despite what some folks may say Jul 05 21:43:36 i figure I would get more mileage out of that than assm Jul 05 21:43:40 really Jul 05 21:43:46 in that case Jul 05 21:43:56 some snippets on getting stuff done in assembler Jul 05 21:44:04 like I am not sure how I would divide Jul 05 21:44:06 if you go C, you'll have to work 2x as hard to get the real time aspects Jul 05 21:44:15 good point Jul 05 21:44:31 i kind of got quick branching Jul 05 21:44:34 if all you want is access to 2 general purpose processors, C may be do able for that but these are tiny little things Jul 05 21:44:44 my biggest hangup is passing info Jul 05 21:45:08 manipulate in register but now I want to pass it to the other PRU or the OS Jul 05 21:45:12 also the clocks Jul 05 21:45:15 and syncing them Jul 05 21:45:17 most of the critical things on the PRU comes down to counting cycles - PRU assembly makes that easy. most instructions are 1 cycle Jul 05 21:45:30 syncing clocks? what do you mean? Jul 05 21:45:44 make the PRUs work in sync Jul 05 21:46:19 so the timing between them is correct Jul 05 21:46:19 you do know you can bank your registers right? Jul 05 21:46:25 or what you expect Jul 05 21:46:34 I don't know what that means Jul 05 21:46:44 i am used to variables and very limited pointer work Jul 05 21:47:03 so the idea of move it the register to perform operations and stuff Jul 05 21:47:04 is new Jul 05 21:47:08 and then how it is stored Jul 05 21:47:27 so my quagmire of the day right now Jul 05 21:47:33 have you ever worked with assembly? Jul 05 21:48:18 is zmatt helped me get the UART0 configured. Now I want to make a PRU program that grabs data coming in at a high baud rate and move it to shared memory Jul 05 21:48:43 I have been looking at the reference manual but translating the offset into something usable Jul 05 21:48:49 is a bit much for me Jul 05 21:48:56 this is my first experience in assembler Jul 05 21:49:09 which UART0? the one in the PRUSS or the regular UART0? Jul 05 21:50:10 pr1_uart0_rxd Jul 05 21:50:16 PRUSS UART Jul 05 21:50:24 so I understand the pin muxing finally Jul 05 21:50:31 so that is set up Jul 05 21:50:54 so now I have data flowing to it, how do I go get it via the PRU Jul 05 21:51:03 how fast do you want to go on the UART? the normal ARM stuff should handle the higher speeds just fine Jul 05 21:51:05 so in the manual you can find tidbits like pr1_uart0_rxd Jul 05 21:51:22 400K baud rate Jul 05 21:51:42 this going to be paired with quadreture encoder data coming in pretty fast Jul 05 21:51:57 I want to have a pretty tight coupling of motor position and force data coming in Jul 05 21:52:10 I'd think the normal UART should handle that Jul 05 21:52:20 I have seen it run fine with the near 1M rate Jul 05 21:52:46 bluetooth often runs it that fast Jul 05 21:52:49 i also found this 0x0002_8000 Jul 05 21:52:58 as the start address for UART0 Jul 05 21:53:07 i am guessing I would offset off that value Jul 05 21:53:15 but I am not sure Jul 05 21:53:27 yeah the grand scheme is to have PRU1 do a pid loop Jul 05 21:53:32 to control motor speed Jul 05 21:54:12 ah Jul 05 21:54:21 based on force readings. Since the force will have a non linear relationship with position and move fast, I figured the PRUs make sense. Plus I have the OS occupied doing some light vision work Jul 05 21:54:22 for that C might be fine Jul 05 21:54:45 i am not sure how I get there via assembly but I am sure I can find some snippets via google Jul 05 21:55:04 latency I think is the main driving factor for doing it in the PRU Jul 05 21:55:24 if you want brute speed, the ARM side is faster but latency is variable there Jul 05 21:55:44 some sort of guide is needed to fill in gaps so I can implement in a beagle setting Jul 05 21:56:36 yeah I want pretty complex force patterns that will be predetermined and i think the low latency will minimize the error Jul 05 21:56:40 i hope Jul 05 21:56:54 plus this will really force me to cut my teeth on this whole mess Jul 05 21:57:20 but a great guide would be something that shows you how to take stuff from the reference manual and use it Jul 05 21:57:33 so like 0x0002_8000 for UART0 PRU Jul 05 21:57:42 hmmm ok Jul 05 21:58:30 it is place in memory, that is nice but how does that relate to info coming in from the UART Jul 05 21:58:47 how does that relate to the pin pr1_uart0_rxd Jul 05 21:58:55 or pr1_uart0_txd Jul 05 21:59:22 i harp on that one because that is most pressing but basically how to get stuff into and out of the PRU Jul 05 21:59:31 i think the rest one can google and experiment Jul 05 21:59:39 also debugging is completely different Jul 05 22:00:00 i learned recently my level of understanding is called script jocky Jul 05 22:00:03 lol Jul 05 22:00:44 whats banking a registery Jul 05 22:01:34 so basics of PRU is what you'd be interested in Jul 05 22:01:40 i think it is key for the PRUs to be more understandable Jul 05 22:01:41 yes Jul 05 22:01:48 its what sets the BBB from the pi Jul 05 22:02:00 i had someone ask me the other day why not just use a pi Jul 05 22:02:27 from a marketing standpoint i do not think beagle markets itself effectively to layman Jul 05 22:02:52 i would be on a pi with arduinos just because they flood the airwaves Jul 05 22:03:23 mark yoder PRU cookbook with a bit more flesh Jul 05 22:03:28 and examples. Jul 05 22:04:06 I thought it would be hte more advance stuff that's of interest Jul 05 22:04:22 and maybe make it so we are not dependent on an all encompassing makefile Jul 05 22:04:39 yes but if we cannot bridge the gap we will tap out before it gets fun Jul 05 22:04:45 so a mix of both Jul 05 22:05:01 good point. don't want to lose people before you get there Jul 05 22:05:05 i was gonna try and make something as well to pay it forward Jul 05 22:05:12 baby steps Jul 05 22:05:31 i really enjoy this stuff and all the cool hobby projects Jul 05 22:05:50 once the AI gets a bit more seasoned I will jump to that and look out Jul 05 22:06:04 wonder if there is enough people that want the basics to make it worthwhile Jul 05 22:06:19 if you go on derek molloys website Jul 05 22:06:27 AI is fun...esp with vision things Jul 05 22:06:36 in the comment sections of his blog post Jul 05 22:06:43 you will see there is a need Jul 05 22:07:11 a lot of ...not working... I do not understand... this is out of date... Jul 05 22:07:33 the out of date part is especially nasty Jul 05 22:08:58 yup Jul 05 22:09:07 hardest part of setting up a class is organizing the infrastructure Jul 05 22:09:37 i think there are a lot of wanna be hobbyist out there who get scared of the beagle and jump to the pi Jul 05 22:10:05 yup Jul 05 22:10:13 let me know if you would want help Jul 05 22:10:26 like I said I would like to pay some of this assistance forward Jul 05 22:10:31 and to teach is to learn twice Jul 05 22:10:42 if I can explain it to others I know I got it down Jul 05 22:10:53 yep. it is like being able to talk through a problem Jul 05 22:11:25 the other problem is people keep talking about the latest and greatest instead of what works Jul 05 22:11:44 right Jul 05 22:12:15 as others would probally agree, I don't agree with that philophy ;) Jul 05 22:12:47 I think if you made it functional and project based Jul 05 22:12:54 like pru motor control Jul 05 22:13:15 so people can just see what is doing and the end use case for it that would be enough Jul 05 22:13:26 most people do not need the latest and greatest Jul 05 22:13:36 or do not know they do not need the latest and greatest Jul 05 22:17:18 what is your goal with a PRU motor control? Jul 05 22:19:01 this is for my graduate research Jul 05 22:19:07 i am making a tissue squisher Jul 05 22:19:15 to study cartilage Jul 05 22:19:36 the BBB is driving a motor that controls the distance between two N52 magnets Jul 05 22:20:03 i have a camera and load cells that is watching this process and grabbing strain info Jul 05 22:20:13 (no yet in theory it will) Jul 05 22:25:27 Hello I am a student, please can you help me in contributing to your projects. Jul 05 22:29:45 MattB0ne: for grad stuff, couldn't you use a step/dir controller ? Jul 05 22:29:53 I assume you have some funding Jul 05 22:31:38 i do have some funding Jul 05 22:31:45 I was worried about cycles Jul 05 22:32:03 this will be spinning for hours in a given direction Jul 05 22:32:33 the ones I am thinking of are often used on CNC machines which can run for days doing contouring jobs Jul 05 22:32:42 beagle is fun for sure but there are other tools ;) Jul 05 22:33:12 under variable loading conditions. I did not think that gelled well with my application Jul 05 22:33:25 i did not think of CNC motors Jul 05 22:34:07 true but integrating the loading and position control seemed like beagle time Jul 05 22:34:15 not sure what else I could of used Jul 05 22:34:28 not to say this was the only way forward Jul 05 22:36:37 from whta I understand you are building a servo controller Jul 05 22:37:10 those controllers take position encoder input and a motor. they are driven by step and direction pulses Jul 05 22:38:19 yeah Jul 05 22:44:10 that is what I am doing Jul 05 22:46:09 wanted something that could be controlled programmatically Jul 05 22:46:27 high resolution and could interface with my load cell Jul 05 22:59:00 Just for reference, there are some ideas at Element14 for the PRU stuff. Jul 05 23:01:26 link? Jul 05 23:06:45 Okay. Please hold. Jul 05 23:09:57 this one, https://www.element14.com/community/community/designcenter/single-board-computers/next-genbeaglebone/blog/2013/05/22/bbb--working-with-the-pru-icssprussv2, and there is another one w/ many articles. Jul 05 23:11:05 Here: https://www.element14.com/community/community/designcenter/single-board-computers/next-genbeaglebone/blog/2019/08/17/beaglebone-control-stepper-motors-with-pru-part-6a-use-pru-timer-preparation Jul 05 23:11:26 That lady, Jan, I think has many articles in w/ the BBB and PRU. Jul 05 23:14:38 i will take a look Jul 05 23:16:40 Okay. Jul 06 00:33:33 set those links are decent but i need somthing a step a above blinking a light Jul 06 00:33:49 i need to read data Jul 06 01:12:23 Oh. Jul 06 01:12:25 Sorry. Jul 06 01:12:31 I will look at some point. Jul 06 01:12:50 GenTooMan: Parsing. Jul 06 01:13:07 I finally understand what you were describing to me one day we had a chat. Jul 06 01:20:52 So, to test, I would make some grammar and then parse what might be an expression, term, primary, or number. Jul 06 01:24:44 "I have a long way to go!" Jul 06 01:42:36 KenUnix: How did your source for the RelayCape come along? Jul 06 02:19:46 Gathering dust Jul 06 02:28:49 Oh. Jul 06 02:37:54 where is zmatt when you need him Jul 06 02:38:08 he owes it to the community to be here 24/7 Jul 06 02:38:09 lol Jul 06 02:48:43 Ha. I upset him. He quit. Jul 06 02:48:48 I am in charge now. Jul 06 02:48:53 Just playin'. Jul 06 02:49:06 whhhyyyyyyyy..... Jul 06 02:49:09 lol Jul 06 02:49:17 hopefully he will cool off my tomorrow Jul 06 02:49:26 Your tomorrow? Jul 06 02:49:35 by* Jul 06 02:49:58 Aw. Did you see the rest of Jan's articles on the BBB and PRUs? Jul 06 02:50:41 There is at least seven of them. Jul 06 02:50:55 or six. Who knows? Jul 06 02:51:16 taking a peak now Jul 06 02:55:56 I mean, if you handle a LED, a motor is second nature. Sort of. **** BEGIN LOGGING AT Mon Jul 06 02:59:03 2020 **** ENDING LOGGING AT Mon Jul 06 03:00:56 2020