Co-Pine-ON, Boot co-processor assistant
#3
(06-25-2017, 06:29 PM)pfeerick Wrote: ... It certainly ended up neater than I expected it would! Wink

When looking at the next revision of your code, feel free to reuse anything from pine64-SYSLED-heartbeat.sh that you find helpful. It will work as a regularly logged in user, with the following provisions:

In /etc/rc.local, the following (as it needs to be re-applied every boot):
chown -R root:gpio /sys/class/gpio
chmod -R ug+rw /sys/class/gpio

Then the normally logged in user must be in the gpio group i.e.
sudo adduser gpio
sudo usermod -aG gpio your-user-name

I'm intending in the future to make a systemd service version of it so that the /etc/rc.local mods aren't needed.

I am, at least, 2 times surprised myself... this little exercise "told me" a lot about this core-independency and why, perhaps, we should look more at it... not exactly to solve problems, instead to have one mechanism to run code...

2nd: Instead of using 2 pins to talk to the MCU, there is also a possibility to use 1 pin serial communication from the Pine to the MCU, using soft-serial inside the MCU, so that we can send/receive not only ON/OFF but instead, lots of different messages. The serial comm mechanism can inform at what point in the boot the Pine is, giving a better understanding about the whole thing.

I will look at your code, since I need to have, if not the "official" way to access GPIO, at least one that is more correct than the lines that I am using...

Using the Co-Pine-ON MCU, it is also possible to "manage" the POWER-ON button (I think), if so, we can have more elaborated mechanisms, other than just *switch on* thing... I had this thinking at the beginning, perhaps it is also worth enough to implement it...


(06-25-2017, 06:29 PM)pfeerick Wrote: Also, a comment at the top of your PIC source to indicate that it is for the PIC12F1501 Wink

Thanks for pointing this...
This is my (PICKLY) fault... should have this line inside the code...
Version 1 of PICKLY was entirely created around 12F1501 and 16F1503...
A version 2 and plus will be able to handle different MCU targets...


(06-25-2017, 06:29 PM)pfeerick Wrote: EDIT: I also meant to say I'm also eager to hear more about your PICKLY Google Blockly work, as it looks like a great way to get started with PIC programming. Whilst not strictly pine64 related, it deserves future mention here as Google Blockly can also export PHP and Python code, which would be a great starting place for newcomers! Wink

FIRST: Yes, I agree with you about Blockly.
It is a powerful tool to help beginners, but also, I think, a powerful too for the casual coder (I mean, people that from time to time will use/benefit from coding)...
As you said, 'no direct connection to Pine'... but, if instead we take Pine64 as a *computer board*, then, it is not a bad idea to promote both uses in relation to coding... 1 plus 1, in this case, could result in more than 3... lol...

PICKLY: After finishing a "version 1", at least in my oppinion, Blockly has lot to offer, and I like to repeat that IT IS NOT ONLY for beginners, also for the CASUAL coder...
Blockly is relative easy to adapt/change, so, any idea that appears find easy way to code... the only problem is that, each idea implicates in MANY lines of new code... the task of creating the code is relative easy and simple, the VOLUME is the concern... you face a choice between keep adding ideas or making it as minimalist as possible... and BOTH OPTIONS seems cool... !?!?

About Visual Block Programming:
Blockly represent a "jump" on the concept, and still evolving, perhaps another "jump" is possible, or near, and we will be all making use of this "blocks" in every day life...

Valter

PS. Let's also mention that Blockly also generate Javascript...


Messages In This Thread
RE: Co-Pine-ON, Boot co-processor assistant - by ecolezen - 06-26-2017, 07:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PINE A64 SBC: Clone of a functional 32GB SD card doesn't boot burningkrome 3 1,623 05-19-2023, 07:43 AM
Last Post: crocspot
  PINE A64 Ubuntu 18 or 20 IMG with touchscreen? burningkrome 0 609 04-29-2023, 05:13 AM
Last Post: burningkrome
  Pine A64 does only boot with Android 5.1 Dude 6 3,942 07-03-2022, 02:18 PM
Last Post: Dude
  Pine A64+ vs LCD do not boot DDS 3 5,989 02-23-2021, 05:33 PM
Last Post: thedu
  Autodetect if Pine unit is a Pine A64+ or PineA64-LTS pkfpeters 1 3,344 02-09-2021, 12:17 AM
Last Post: tllim
  Pine 64 | 2GB x2 & Acrylic Cases x2 for Sale | Canada - GTA ViperVi 1 4,507 01-18-2021, 03:45 PM
Last Post: squidius
  sd format?for pine 64 angegardien 3 7,787 12-06-2020, 03:53 PM
Last Post: junkyj753
Exclamation Can't boot when SD card inserted kivox 5 8,078 03-15-2020, 06:00 AM
Last Post: kivox
  Node Red on the Pine DonFL 0 2,778 12-16-2019, 04:21 PM
Last Post: DonFL
Photo Pine A64+ from Kick starter running Pi-Hole netHolio 0 3,248 12-02-2019, 09:36 PM
Last Post: netHolio

Forum Jump:


Users browsing this thread: 1 Guest(s)