Node creation request - RasPi Argon hat

I'm not sure how many people who have one, but there is a nice "hat" for the RasPi which has a fan on it.

Seems support isn't too good (not a problem) but I was wondering if it would be possible to make a node (for node-red) that would indicate if the fan is on/off (and at a push the speed).

Just asking.
Thanks.

Have you tried using node-red-contrib-i2c?

1 Like

No... I have maybe seen it, but never looked into it.

That's an idea, I guess.

I guess I will have to look at the existing code (or use that command that scans the I2C bus) to get the address.

(Sorry.....)

I got that set of nodes, and I am not getting how to use them.

IN and OUT are ambiguous to me to what they do.

I wrote a basic bit of stuff and all I can seem to do is turn the fan on or off.
Turning it on requires a high-ish number to be sent.

The address is 26 (decimal) but I am missing something in determining how to monitor what that address is doing.

Did you look at the readme where it tells you what the command should look like?

Start by running the i2c Scan' node connected to a debug` node (set to display the complee msg object) and see if you can identify the address of the fan.

From what I read in the documentation, there is no 'monitor' command.

Oh, ok....

So the code I write scans that address (26) and .......

The i2c Scan node tells me the address of the Hat. That doesn't help me with finding out if the fan is on or off.

Ok, (from your second post).
No there is no "monitor" command.

But (I don't know).... Could I listen to that port and when it sees the command sent, it knows the fan is on.
(Yeah, it has to parse the message... But that's a given)

I get that.

But I have no idea how to do that.

I don't understand what the main two nodes do... The IN and OUT node.

Could I use/set the IN node with the correct address set, and when things happen to that address I see what is/was sent to it?

And wouldn't that be the IN node?
I set it's address to 26 and... all should work.

But that node wants a command and bytes (size)....
To me that doesn't make sense.

But - as usual - I am way out of my depth with how this works.

so take a deep breath and start at the beginning. The documentation says:

# How to Send i2c Codes to the Argon ONE MCU

Example: **Setting Argon ONE to Mode 2 (Always ON)**

Type in the Terminal the code below:

i2cset -y 1 0x01a 0xfe

so what does that command say? Well the first thing to do is find out what each part is. To do that, open a terminal window on that pi and enter man i2cset and find out what each part of that line means. So do it and tell me what you find.

p.s. I think that 0x01a is a typo in their documentation and should be 0x1a

Yes, so there is that command sent:
i2cset -y 1 0x1a 0xfe

So that is sending 0xfe on port 0x1a.

So.... Wouldn't the IN node see that when it is sent?
Or more so: anything sent to port 0x1a? (Given that is the address set in the node?)

But when I open the IN node (node-red-contrib-i2c) wants a COMMAND set/stipulated/defined/declared.....

I don't understand how that works.

I get it that you would do that on the OUT node, but not the IN node.

i2c in

Reads data from a local I2C port.

It will put a buffer object into the msg.payload.

Which of the commands in the Argon40Tech/Argon-ONE-i2c-Codes are commands that will read the hat?

Reading what I see on the github link, there isn't one.

Right you are! The i2c in node will be of no use in your case. So which node do you think you should use to send a command?

I'm not wanting to send a command.

I'm wanting to make a node that listens to what is going on and detects if the fan is on or off.

But..... After looking at the code:

I don't think there is a way to do it as all the Magic happens on that board.
I think.

Though..... The code (python script) runs in the real memory.
So .... to get that script to share what's going on WRT the fan (is it on/off) that script would have to be modified.

But to what is again: beyond me.
As I don't know how to make something that gives the information to node-red.

Well from what I read from the Github page you posted, there is nothing in that device that will send you any information. Maybe you could put some other sensor on the output of the fan to register if it is on or not.

Maybe there is another fan out there that wil tell you if it is on or off.

1 Like

Seems I shall have to let this go to the keeper.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.