Digital Write on analog port

Hi there.
With the arduino IDE is possible to Digital Write high / low values on analog ports.
But I can´t find the way to do it on Snap.
Is there a way to solve it ?
Thanks.

dont you use a url?

What? a url for ?

somewhere on snap it gives a url to connect to different devices

I Think is not what I need. I need to write HIGH or LOW on A0, A1....

idk how to do that since i started snap like 3 days ago

:grinning: Thanks any way.

Hi @kothe,

Nnote for all. I guess he is talking about Snap4Arduino. I move this post to that category)

Yes you can! But you must use their "digital" referenced names. In a UNO, you know A0 is also pin 14, A1-15... A5-19.
In addition, pins input dropdown is just showing you all the pins are able for you. And you will find there all these digital pins (analogs included)

Joan

Ouh That's really cool!!
Thanks Joan.

use js

This is not helpful, and doubly not helpful after @jguille2 has already solved the problem.

I always thought that A0 through A5 were input. (so the normal pins like 13 are for digital everything, pins like 12 are for digital read and all write, pins like A0 are all read)

From Arduino cc

Notes and Warnings

The analog input pins can be used as digital pins, referred to as A0, A1, etc. The exception is the Arduino Nano, Pro Mini, and Mini’s A6 and A7 pins, which can only be used as analog inputs.
So yes, you can use analog pins to digital write.

Hi,
Some extra comments... but not needed for a general use of Snap4Arduino, that tries to allow users to 'tinker' easily and freely without much consideration about hardware details.

  • Snap4Arduino uses Firmata protocol. You can see there more details. Note that it can use any microcontroller running that Firmata (Arduinos, ESPs, micro:bits...) A bunch of models and then, a bunch of hardware considerations...
  • To use general microcontrollers, we need to know their "pinout". Here there are different notations (pin numbers). Usually, we talk about their GPIO pin numbers. Each pin can have different features by hardware: to be digital input/output (the most simple one), support PWM, analog converters (to be analog inputs or analog outputs)...
  • Firmata (and Snap4Arduino) uses those GPIO numbers on digital functions (digital write, digital read, servo and analog write (yes, is a digital function using pwm pulses)) to point board pins. This is perfect for Arduino boards ( see UNO GPIOs) because these are the same as pin labels, but more complicate in other boards (see NodeMCU GPIOs because board labels do not mach the same.
    This is the same Arduino sketches does.
  • With analog functions (analog read), again, Firmata and Snap4Arduino do the same as Arduino sketches and use their pin aliases but using only the number (without the previous "A"). And again, very easy because these are the pin labels.
    In other boards it could be more complicate, but always "analog 0" is the pin with analog features with the lowest GPIO number.

That's all,
Joan

Where did you get that info from? I've always wondered if one could use analogue pins as digital outputs.

Here....

On Notes and Warnings.

Hello....you just need to indicate the beginning pin and the all bits in the comparing port will be refreshed with the given worth. Make a point to set all pins as a yield first. You can likewise allude here for the planning of pins to ports on the Mega. I think you are keen on pins 82-97.

rigid flex pcb design for assembly guidelines