**** BEGIN LOGGING AT Wed Jul 03 03:00:28 2019 Jul 03 03:14:03 no need to learn so loudly Jul 03 03:14:38 Okay, okay. Shoosh. I get it. Jul 03 03:19:21 @zmatt: I cannot wrap my head around running LEDs from a perl script. Jul 03 03:19:33 It works in bash but not perl. Jul 03 03:19:46 why are you trying to use perl? Jul 03 03:19:58 well PERL is primarily used for data processing not IO. Jul 03 03:20:03 B/c...it is not listed anywhere on the entire web. Jul 03 03:20:10 I know but they have i/o too. Jul 03 03:20:12 GenTooMan: and is also not spelled all-uppercase :P Jul 03 03:20:35 all lower-case Moochenhouser! Jul 03 03:20:55 ? Jul 03 03:21:05 zmatt it is an acronym? Practical Extraction Report Language Jul 03 03:21:05 set_: as far as I know you're currently not particularly good with any programming language, why don't you try to learn *one* (e.g. python) better before trying to learn another one Jul 03 03:21:06 Hello? Jul 03 03:21:23 Okay. Jul 03 03:21:55 I figured the echo >/sys/class/gpio/gpio60/direction and then " "/value would work. Jul 03 03:22:03 I could not get it to understand even though it ran. Jul 03 03:22:08 GenTooMan: https://perldoc.perl.org/perlfaq1.html#What's-the-difference-between-%22perl%22-and-%22Perl%22%3f Jul 03 03:22:17 I need to delcare something else I think. Jul 03 03:22:51 drink time. brb Jul 03 03:23:38 set_ perhaps directly open access to the device and write to it using normal file I/O? Jul 03 03:24:06 yes, controlling gpio via sysfs is basically equivalent to learning how to read/write files Jul 03 03:24:11 Right. That is what I tried w/ open() or die "". Jul 03 03:26:42 i guess i need another langauge too w/in perl. Jul 03 03:27:08 or module Jul 03 03:27:10 open(FILE_IO, ">/sys/class/gpio/gpio60/direction") or die "epic fail on IO" Jul 03 03:27:23 is that what you did? Jul 03 03:27:35 Yes...sort of. Jul 03 03:28:27 Except w/ open( DATA, "+>/sys/class/gpio/gpio/direction/out" ) or die "epic fail on I/O"; Jul 03 03:29:59 I even tried w/ the same as above but w/ ---> or die "blah, blah", $!; Jul 03 03:30:29 I went online to look around. Jul 03 03:30:35 I found no one w/ the right cure for this idea. Jul 03 03:31:21 I am not sure which is necessary for the file IO with a device. You could try experimenting with >, +>, >>, or +>> for various tests. Jul 03 03:31:31 I tried them. Jul 03 03:31:32 oh god please people don't write such hideous archaic perl Jul 03 03:31:39 Fine. Jul 03 03:32:06 It has nice colors. Like when people used to wear the brand "Colors." Jul 03 03:32:32 Like if it was from Africa w/ good intent. Jul 03 03:32:38 Sorry. Jul 03 03:32:57 I tried sysopen too. Jul 03 03:33:26 and all the available write, read, blah, and, blah to make it work. Jul 03 03:33:42 that is definitely a clearer less arcane method. Jul 03 03:34:12 Ha! Jul 03 03:34:31 Oldie, but goodie! Jul 03 03:37:27 set_ write your code so you can understand it later my policy. Hence why I've not used Perl in over 2 decades. Perl was better used for writing postscript files or generating PDF's from text. That's what I used it for. I wonder if perl interpretor is using the correct ioctl type commands. Jul 03 03:38:53 oh well good night brain is doing strange things. Jul 03 03:39:01 https://pastebin.com/462qZxQG Jul 03 03:40:05 this is how I'd write gpio access in perl... except for anything more than a one-off thing I'd probably want to wrap it in a class to keep the relevant file handle(s) open and such Jul 03 03:41:04 note that I'm using syswrite/sysread purely because I know I'm accessing sysfs attributes, you would normally not use them for regular files Jul 03 03:42:08 (the weird gpio name is because I tested this on my bbx15, replace by path to gpio of your choice) Jul 03 03:44:52 Okay. Jul 03 03:44:56 Off to test it. Jul 03 03:45:04 syswrite and sysread. Jul 03 03:46:38 @zmatt: Did that work on your end? Jul 03 03:46:54 w/ an internal or external LED? Jul 03 03:47:36 I just confirmed that it worked, I don't need anything connected to the gpio to see that it works Jul 03 03:48:23 Okay. Jul 03 03:48:33 Off to test like I stated earlier. Jul 03 03:49:34 but again, why are you trying to use perl for this? previously you've used python, and I think that's a much better choice of language for you Jul 03 03:50:18 I wanted to use a new language to try things out. I have been reading perl scripts and learning about that language for a couple days now. Jul 03 03:51:05 Weeks or days. Who knows? I know I wanted to try the LED example in this language though. Jul 03 03:52:50 @zmatt: under "my $gpio" in the script, I am receiving the same odd "/sys/class/gpio60" coloring. Jul 03 03:52:52 but there is no benefit in using perl for this, and honestly learning perl is not something I would recommend to you Jul 03 03:53:10 I saw the man pages for perl. Jul 03 03:53:16 It is nice and well oriented. Jul 03 03:53:44 The scripting is difficult but once understood, I think I could use it. Jul 03 03:54:11 Unlike right now...I know. I am full of issues. Jul 03 03:54:43 It had a photo of an onion. Nice! Jul 03 03:54:50 I strongly believe that anything you'd manage to do in perl, you would be able to do with less effort in python Jul 03 03:55:34 I think you are right. I saw that script. It is not easy to articulate the ideas revolving around that source. Jul 03 03:56:06 (there are some things that are easier to do in perl than python, but I don't think you're going to run into those. overall the choice is mostly up to personal preference, with perl being preferred by old farts like me who already happen to be familiar with it) Jul 03 03:56:29 @zmatt: so again: Line 20 of the software... Jul 03 03:56:40 I get it. It is an oldie but goodie game. Jul 03 03:57:00 I will refrain from asking too many questions regarding perl in here. Jul 03 03:58:46 line 20 just defines the path to the gpio, i.e. "/sys/class/gpio/gpioNNN" (where N is the gpio number) or "/dev/gpio/NAME" if you have an udev rule that creates suitable symlinks there Jul 03 03:58:55 Right. I get that idea. Jul 03 03:59:06 I am receiving an odd color scheme around that line. Jul 03 03:59:13 I have no clue what you mean by that Jul 03 03:59:38 s/class/ is white while /sy gpio60 is yellow. Jul 03 03:59:38 but whatever your problem is, it's solved really easily by not using perl Jul 03 03:59:44 If that makes sense. Jul 03 03:59:45 Okay. Jul 03 03:59:53 then you probably have a missing quote somewhere or something Jul 03 04:00:02 or your editor is just confused Jul 03 04:00:12 applying proper syntax highlighting to perl can be rather difficult Jul 03 04:00:12 My editor most likely. Jul 03 04:02:19 I got it. Jul 03 04:02:25 I got what I was doing earlier too. Jul 03 04:02:50 I was using /gpio60/gpio instead of /gpio/gpio60. Aw to typos. Jul 03 04:03:25 @zmatt: You fixed the age old conundrum of perl and LEDs. Yea boy! Jul 03 04:04:54 I am going to try to change the software some, e.g. so I am not quoting you line for line. Jul 03 04:05:22 @zmatt: If you want, I can give you credit if used w/ slight changes. What say you? Jul 03 04:06:41 set_, there's like no actual code in there to credit, I just open a file and read/write a value Jul 03 04:06:51 I am asking b/c i was going to set up some "how-to" or how-not-to things online. Jul 03 04:06:53 Fine. Jul 03 04:07:19 I always try to give you credit you desire not. Jul 03 04:07:30 Fine by me. I will pretend it fell out of the sky. Jul 03 04:08:07 "This software from the blue sky on Freenode fell directly into my finger tips." <-- is this okay? Jul 03 04:08:49 Enough jokes. Jul 03 04:08:57 It is always nice when you pitch in. Jul 03 04:09:03 Booya! Jul 03 10:46:44 m Jul 03 10:52:08 n Jul 03 11:28:11 o Jul 03 11:29:19 set_ I like the idea of a "how-NOT-to" for some reason Jul 03 11:33:47 ^ +1 Jul 03 21:15:38 Hi, is there someone who can help debug i2c issues with the beaglebone black? Jul 03 21:18:03 possibly .. what are you seeing? Jul 03 21:39:35 stew7[m]: nope, noone can, since you didn't actually explain what issue you're having :P Jul 03 21:45:59 GenTooMan: Like, "Do not try this at home," how-not-to? Jul 03 21:50:07 zmatt: +3 Jul 03 21:52:12 Off to create ideas on how-not-to do things around software and the BBB! Jul 03 21:52:22 Yea boy! Jul 03 21:53:07 I will update most books and post on Hackster.io (an avnet co) so they can be scorned for centuries to come. Jul 03 21:53:43 Or hackaday, one or the other or both. Who knows? Jul 03 22:02:12 ... Jul 03 22:02:23 at least what I can comprehend. Jul 03 23:20:03 :thumbsup: **** ENDING LOGGING AT Thu Jul 04 02:59:57 2019